Long press on link doesn't load firefox context menu (iOS 12.2 beta)
Categories
(Firefox for iOS :: General, defect, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| fxios | 16.0 | --- |
People
(Reporter: mgaudet, Assigned: garvan)
Details
Attachments
(1 file)
|
117.82 KB,
image/jpeg
|
Details |
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.
Comment 1•7 years ago
|
||
ni? catalin to try and find STR
Comment 2•7 years ago
|
||
no luck so far. will keep trying.
Updated•7 years ago
|
Comment 3•7 years ago
|
||
Reproducible on iOS 12.2b1 (16E5181f) with Firefox 15.0 (13791). Also reproducible on Firefox 14.0 (12646) released version.
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.
Fixed on master, it will be useful to know how robust this approach is.
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).
Description
•