Closed
Bug 1090906
Opened 10 years ago
Closed 10 years ago
Inaccessible context menu is presented with right-click when in Pointer lock mode.
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
mozilla36
People
(Reporter: jujjyl, Assigned: smaug)
Details
Attachments
(1 file)
4.81 KB,
patch
|
masayuki
:
review+
|
Details | Diff | Splinter Review |
STR: 1. Visit https://dl.dropboxusercontent.com/u/40949268/dump/pointer-lock-demo-fullscreen/index.html 2. Click on the canvas, accept the fullscreen and pointerlock requests. 3. Press the right mouse button. Observed: A context menu is presented, but the user has no way to access it since there is no mouse cursor: https://dl.dropboxusercontent.com/u/40949268/Bugs/pointerlock_rightclick.png Expected: The context menu should not appear on right-click.
Assignee | ||
Comment 1•10 years ago
|
||
hmm, I wonder what the behavior should be. I guess the context menu could be disabled, or even should be.
Reporter | ||
Comment 2•10 years ago
|
||
I don't think there's other way than to disable the context menu. This is because when the user right-clicks, there's no way to choose which element the context menu should apply to. Dropping the fullscreen mode, one can also repro it here: https://dl.dropboxusercontent.com/u/40949268/dump/pointer-lock-demo/index.html . It seems that the context menu is applied to the element that's at the center of the screen, and if one resizes the page to very small size before going to pointer lock mode, so that the canvas is not at the center of the page, then the context menu that pops up applies to the page background rather than the canvas, which makes no sense.
Assignee | ||
Comment 3•10 years ago
|
||
But we still do want right clicks I assume. Just don't show the contextmenu.
Reporter | ||
Comment 4•10 years ago
|
||
Yeah, definitely - applications will want to process the right clicks in a way that they see applicable, so the right click events should flow, just that a context menu would never show up even if the JS code did not .preventdefault() the events away.
Assignee | ||
Comment 5•10 years ago
|
||
Ok, let's not dispatch contextmenu event nor show the context menu.
Assignee: nobody → bugs
Assignee | ||
Comment 6•10 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=8215ff4245d7 Returning error code from EventStateManager::PreHandleEvent prevents DOM dispatch and PostHandleEvent call. CreateClickHoldTimer/FireContextClick cases are need for the case when we have click_and_hold_activates_context_menu active. Test is rather minimal. (and we have pointerlock tests disabled on linux, but I enabled them locally)
Attachment #8513750 -
Flags: review?(masayuki)
Updated•10 years ago
|
Attachment #8513750 -
Flags: review?(masayuki) → review+
Assignee | ||
Comment 7•10 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/b0b71ab4cd59
Comment 8•10 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/b0b71ab4cd59
Status: NEW → RESOLVED
Closed: 10 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → mozilla36
Reporter | ||
Comment 9•10 years ago
|
||
Great work, thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•