Closed Bug 1283582 Opened 3 years ago Closed 3 years ago

Fennec displays a context menu on long-press, even if the 'contextmenu' is cancelled by web content

Categories

(Firefox for Android :: Toolbar, defect, P2)

All
Android
defect

Tracking

()

RESOLVED FIXED
Firefox 50
Tracking Status
firefox47 --- wontfix
firefox48 --- verified
firefox49 --- verified
firefox50 --- verified

People

(Reporter: kats, Assigned: kats)

References

Details

(Keywords: correctness)

Attachments

(1 file)

This appears to be a long-standing issue in Fennec, I can repro in current release (47) through to Nightly (50). STR:
1) Load http://people.mozilla.org/~kgupta/touch.html
2) Tap on the "contextmenu" checkbox. This will cause the page to call preventDefault() on contextmenu events
3) Long-press on the "Link to nowhere"

ER: No browser context menu is shown
AR: Browser shows a context menu
Priority: -- → P2
Version: unspecified → Trunk
Comment on attachment 8766884 [details]
Bug 1283582 - Stop displaying the context menu in Fennec if web content did a preventDefault on the event.

https://reviewboard.mozilla.org/r/61604/#review59086

Sounds reasonable to me.
Attachment #8766884 - Flags: review?(margaret.leibovic) → review+
Pushed by kgupta@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/f0c70bfa8917
Stop displaying the context menu in Fennec if web content did a preventDefault on the event. r=margaret
https://hg.mozilla.org/mozilla-central/rev/f0c70bfa8917
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 50
Verified using:
Device: Samsung Galaxy S6 Edge (Android 5.1.1)
Build: Firefox for Android Nigtly - 50.0a1(2016-07-06)
Comment on attachment 8766884 [details]
Bug 1283582 - Stop displaying the context menu in Fennec if web content did a preventDefault on the event.

Approval Request Comment
[Feature/regressing bug #]: Long-standing bug
[User impact if declined]: Pages that prevent the browser from showing a context menu (often because they have their own context menu) will be unable to. The user might end up with both the page's context menu and the browser's context menu which can be annoying. Shouldn't be a huge issue though, as the browser's context menu can be easily dismissed and then the user should be able to access the page's context menu.
[Describe test coverage new/current, TreeHerder]: none
[Risks and why]: Fairly low risk, this change brings Fennec behaviour in line with what desktop and other browsers do.
[String/UUID change made/needed]: none
Attachment #8766884 - Flags: approval-mozilla-beta?
Attachment #8766884 - Flags: approval-mozilla-aurora?
Comment on attachment 8766884 [details]
Bug 1283582 - Stop displaying the context menu in Fennec if web content did a preventDefault on the event.

This patch fixes a UI behavior. Take it in 48 beta 7 and aurora.
Attachment #8766884 - Flags: approval-mozilla-beta?
Attachment #8766884 - Flags: approval-mozilla-beta+
Attachment #8766884 - Flags: approval-mozilla-aurora?
Attachment #8766884 - Flags: approval-mozilla-aurora+
Verified as fixed on latest Beta 48.0b9 and Aurora 49.0a2 (2016-07-18) but if page is reloaded, the bug can be reproduced.
Depends on: 1287729
You need to log in before you can comment on or make changes to this bug.