diff --git a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java index 7328acdd0..bc44618bb 100644 --- a/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java +++ b/app/src/common/shared/org/mozilla/vrbrowser/ui/widgets/WindowWidget.java @@ -57,6 +57,7 @@ import org.mozilla.vrbrowser.ui.widgets.prompts.ConfirmPromptWidget; import org.mozilla.vrbrowser.ui.widgets.prompts.PromptWidget; import org.mozilla.vrbrowser.ui.widgets.settings.SettingsWidget; +import org.mozilla.vrbrowser.utils.StringUtils; import org.mozilla.vrbrowser.utils.SystemUtils; import org.mozilla.vrbrowser.utils.ViewUtils; @@ -1632,6 +1633,11 @@ public void onSecurityChange(GeckoSession geckoSession, SecurityInformation secu @Override public void onShowActionRequest(@NonNull GeckoSession aSession, @NonNull Selection aSelection, @NonNull String[] aActions, @NonNull GeckoResponse aResponse) { + if (StringUtils.isEmpty(aSelection.text) || (aActions.length == 1 && GeckoSession.SelectionActionDelegate.ACTION_HIDE.equals(aActions[0]))) { + // See: https://github.com/MozillaReality/FirefoxReality/issues/2214 + aResponse.respond(GeckoSession.SelectionActionDelegate.ACTION_HIDE); + return; + } TelemetryWrapper.longPressContextMenuEvent(); hideContextMenus();