Skip to content
This repository was archived by the owner on Jul 22, 2024. It is now read-only.

Commit c17bd07

Browse files
MortimerGorobluemarvin
authored andcommitted
Request focus when clicking URL bar icon buttons. Fixes #2301. (#2312)
1 parent 18bb273 commit c17bd07

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

app/src/common/shared/org/mozilla/vrbrowser/ui/views/NavigationURLBar.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,10 @@ private void initialize(Context aContext) {
239239
mURLWebsiteColor = typedValue.data;
240240

241241
// Bookmarks
242-
mBinding.bookmarkButton.setOnClickListener(v -> handleBookmarkClick());
242+
mBinding.bookmarkButton.setOnClickListener(v -> {
243+
v.requestFocusFromTouch();
244+
handleBookmarkClick();
245+
});
243246

244247
// Initialize bindings
245248
mBinding.setIsLibraryVisible(false);
@@ -479,6 +482,7 @@ public void setClickable(boolean clickable) {
479482
if (mAudio != null) {
480483
mAudio.playSound(AudioEngine.Sound.CLICK);
481484
}
485+
view.requestFocusFromTouch();
482486

483487
if (mDelegate != null) {
484488
mDelegate.onVoiceSearchClicked();
@@ -500,6 +504,7 @@ public void setClickable(boolean clickable) {
500504
mAudio.playSound(AudioEngine.Sound.CLICK);
501505
}
502506

507+
view.requestFocusFromTouch();
503508
if (mDelegate != null) {
504509
mDelegate.onPopUpButtonClicked();
505510
}

0 commit comments

Comments
 (0)