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

Commit 04b04a5

Browse files
keianhzoMortimerGoro
authored andcommitted
Fixes crash when long pressing a non focused url bar (#1670)
1 parent fd1ab0f commit 04b04a5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55

66
package org.mozilla.vrbrowser.ui.views;
77

8+
import android.annotation.SuppressLint;
89
import android.content.Context;
910
import android.content.res.Resources;
1011
import android.text.Editable;
@@ -105,6 +106,7 @@ public NavigationURLBar(Context context, AttributeSet attrs) {
105106
initialize(context);
106107
}
107108

109+
@SuppressLint("ClickableViewAccessibility")
108110
private void initialize(Context aContext) {
109111
mAudio = AudioEngine.fromContext(aContext);
110112

@@ -143,6 +145,10 @@ private void initialize(Context aContext) {
143145
}
144146
return view.onTouchEvent(motionEvent);
145147
});
148+
mURL.setOnLongClickListener(v -> {
149+
mURL.requestFocus();
150+
return false;
151+
});
146152
mURL.addTextChangedListener(mURLTextWatcher);
147153

148154
// Set a filter to provide domain autocomplete results

0 commit comments

Comments
 (0)