Closed Bug 1520629 Opened 7 years ago Closed 7 years ago

Long press on link doesn't load firefox context menu (iOS 12.2 beta)

Categories

(Firefox for iOS :: General, defect, P2)

Other
iOS
defect

Tracking

()

VERIFIED FIXED
Tracking Status
fxios 16.0 ---

People

(Reporter: mgaudet, Assigned: garvan)

Details

Attachments

(1 file)

Attached image Image-1.jpg

On occasion, Firefox iOS will get into a state where the context menu being opened is not the Firefox one I expect; instead it seems to be the default webview.

I reported a different issue that also involved the default share sheet in Bug 1480563.

ni? catalin to try and find STR

Flags: needinfo?(catalin.suciu)
Priority: -- → P2

no luck so far. will keep trying.

Reproducible on iOS 12.2b1 (16E5181f) with Firefox 15.0 (13791). Also reproducible on Firefox 14.0 (12646) released version.

Flags: needinfo?(catalin.suciu)
Assignee: nobody → gkeeley

WebKit bug for this https://bugs.webkit.org/show_bug.cgi?id=193366
and the patch https://bug-193366-attachments.webkit.org/attachment.cgi?id=358946

It is still useful to land our patch which re-tries to hook into the longpress gesture, and seem like it might defend against cases where the hook isn't being installed.

Summary: Long press on link doesn't load firefox context menu → Long press on link doesn't load firefox context menu (iOS 12.2 beta)

Fixed on master, it will be useful to know how robust this approach is.

Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED

Verifying as fixed on 16.0 (14386).

Status: RESOLVED → VERIFIED

For posterity, doing this ContextMenuHelper.swift seems to work:

    func monitorForReplacement() {
        DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
            if self.gestureRecognizerWithDescriptionFragment("ContextMenuHelper") == nil  {
                self.replaceWebViewLongPress()
            }
            self.monitorForReplacement()
        }
    }

That is, watching the tab every 200 ms to see if our ContextMenuHelper is present, and if not, install it.
I see no usable WKWebView event that will let us know when the content process has swapped (at which point the custom gesture handler is uninstalled).

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: