Skip to content

Commit

Permalink
[Home] Make BottomToolbarPhone focusable
Browse files Browse the repository at this point in the history
Previously BottomToolbarPhone was only focusable when the expand button
wasn't enabled. This change makes it always focusable, ensuring that the
first visible focusable item isn't the URL bar. This prevents Android
from focusing the URL bar when returning to Chrome from Android recents.

BUG=731603

Change-Id: I375c1e9539358ae1dfc4031fb9893afbc5a4bacd
Reviewed-on: https://chromium-review.googlesource.com/530160
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#478461}
  • Loading branch information
Theresa Wellington authored and Commit Bot committed Jun 9, 2017
1 parent 1275d66 commit 8b6b293
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion chrome/android/java/res/layout/bottom_toolbar_phone.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/toolbar"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_height="match_parent"
android:focusable="true"
android:focusableInTouchMode="true" >

<include layout="@layout/toolbar_phone_common"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -441,8 +441,6 @@ public void onNativeLibraryReady() {
if (!mUseToolbarHandle) {
initExpandButton();
} else {
setFocusable(true);
setFocusableInTouchMode(true);
setContentDescription(
getResources().getString(R.string.bottom_sheet_accessibility_toolbar));
}
Expand Down

0 comments on commit 8b6b293

Please sign in to comment.