Skip to content

Commit

Permalink
Fixes crash when long pressing a non focused url bar (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
keianhzo authored and MortimerGoro committed Aug 27, 2019
1 parent fd1ab0f commit 04b04a5
Showing 1 changed file with 6 additions and 0 deletions.
Expand Up @@ -5,6 +5,7 @@

package org.mozilla.vrbrowser.ui.views;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.res.Resources;
import android.text.Editable;
Expand Down Expand Up @@ -105,6 +106,7 @@ public NavigationURLBar(Context context, AttributeSet attrs) {
initialize(context);
}

@SuppressLint("ClickableViewAccessibility")
private void initialize(Context aContext) {
mAudio = AudioEngine.fromContext(aContext);

Expand Down Expand Up @@ -143,6 +145,10 @@ private void initialize(Context aContext) {
}
return view.onTouchEvent(motionEvent);
});
mURL.setOnLongClickListener(v -> {
mURL.requestFocus();
return false;
});
mURL.addTextChangedListener(mURLTextWatcher);

// Set a filter to provide domain autocomplete results
Expand Down

0 comments on commit 04b04a5

Please sign in to comment.