Closed Bug 1349183 Opened 3 years ago Closed 2 years ago
Context menu press also triggers page navigation on certain sites
iOS fw 10.2.1 Device : iPad Pro 12.9" iOS 10.2.1 - v7.0(2125) Steps to reproduce: 1. Go to news.google.com 2. Long tap on a link to trigger the context menu 3. After the context menu is triggered, release the tap Expected result: The link should not be triggered and opened in a new tab Actual result: The link is triggered and accessed via new tab and the context menu displayed in the newly created tab Please note that this issue might be device specific since could not be triggered on a iPad air 2 For further details please check : https://www.youtube.com/edit?o=U&video_id=IKF9lpWZvvg
There was some fixes that landed on master recently that might resolve this. Let's retest this on a latest version of master.
Seems that i can reproduce this issue also on iPad Air 2 iOS 10.2 - v7.0b2330
Correct video link: https://www.youtube.com/watch?v=IKF9lpWZvvg
Whiteboard: [MobileCore] → [MobileCore][papercut]
Can not repro anymore. Yahoo News used to have the same bug and I can't get it happen there anymore. :Ninu can you try on 10.3 device?
Works fine on iOS 10.3 (iPad Air) but it's still reproducing on iOS 10.2 (iPad Pro) Tested on v8.0b4530.
Thanks for the update. I can't get a context menu at all on news.google.com when I long press on links (ANY links on the page), which is puzzling. The context menu should be eating the press event so that JS on the page doesn't get it. I haven't looked at the code for this, I wonder if we already have a guard such that if the context menu is showing, block page navigations.
Summary: Page opened in new tab automatically although the context menu is triggered → Context menu press also triggers page navigation on certain sites (pre-10.3 only?)
ni'd as requested
This seems to have been fixed in 10.3. This is fixable in an explicit fashion if we find it crops up again. In BrowserViewController.contextMenuHelper add a flag to block navigation in the WKWebView nav delegate while a context menu is showing.
This seems WONTFIX to me.
Able to reproduce on facebook.com on 10.3 on iPhone; in the non-logged-in state, there is a link 'Get Facebook for iPhone'. Long-pressing on that will show the context menu and also navigate. If the context menu code doesn't block navigation while the context menu is showing, I think this bug will be reproducible in various circumstances.
Summary: Context menu press also triggers page navigation on certain sites (pre-10.3 only?) → Context menu press also triggers page navigation on certain sites
This seems related to Bug 1367821 that I looked at a little bit ago. In that particular case, web content was not able to suppress the context menu action sheet by calling `preventDefault()` on the `touchstart` event. I would like to take a closer look at what is going on in Comment 10 with facebook.com to get a minimal test case to reproduce this.
See Also: → 1367821
Bumping to 9.1 because this may also be affecting text caret dragging for input fields on iOS 11.
Whiteboard: [MobileCore][papercut] → [MobileCore][papercut][needsuplift]
Landed on master, uplifted to v9.x
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Verifying as fix on master and beta 9.1 (6241). All long-press interaction work as expected (long press on text, images, in text fields, on links, on both iOS 10.3 and 11)
Whiteboard: [MobileCore][papercut][needsuplift] → [MobileCore][papercut]
You need to log in before you can comment on or make changes to this bug.