Commit a64933b5 authored by Mehran Mahmoudi's avatar Mehran Mahmoudi Committed by Commit Bot

[TabViewManager] Fix omnibox focus issue

This makes all Views added through TabViewManager explicitly focusable.

On some versions of Android, these views were not focusable by default
and this led to an issue where the omnibox gained focus after a View
was added and it never releases the focus.

Bug: 1081628
Change-Id: Ifb272500a274dfd64f432650a567ce20881e6c50
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2307536Reviewed-by: default avatarTheresa  <twellington@chromium.org>
Commit-Queue: Mehran Mahmoudi <mahmoudi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#790062}
parent 77785e1e
...@@ -122,6 +122,8 @@ class TabViewManagerImpl implements TabViewManager, Comparator<TabViewProvider> ...@@ -122,6 +122,8 @@ class TabViewManagerImpl implements TabViewManager, Comparator<TabViewProvider>
if (currentTabViewProvider != null) { if (currentTabViewProvider != null) {
view = currentTabViewProvider.getView(); view = currentTabViewProvider.getView();
assert view != null; assert view != null;
view.setFocusable(true);
view.setFocusableInTouchMode(true);
} }
mCurrentView = view; mCurrentView = view;
initMarginSupplier(); initMarginSupplier();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment