Closed
Bug 1304761
Opened 8 years ago
Closed 8 years ago
Javascript contextmenu event not fired when e10s enabled
Categories
(Core :: DOM: Events, defect)
Tracking
()
RESOLVED
FIXED
mozilla52
People
(Reporter: ozzob1, Assigned: jessica, NeedInfo)
Details
Attachments
(2 files)
403 bytes,
text/html
|
Details | |
1.24 KB,
patch
|
smaug
:
review+
|
Details | Diff | Splinter Review |
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 Build ID: 20160916101415 Steps to reproduce: 1) On DIV node, attach Javascript callback on mouseup and contextmenu event. 2) In mouseup callback, send synchronous XMLHttpRequest 3) Right click on DIV node Actual results: In Firefox with e10s enabled, contextmenu event is never fired (regardless of XMLHttpRequest request treatment time). In Firefox with e10s disabled, contextmenu event is always fired. Expected results: Firefox with e10s enabled should have the same behavior than with e10s disabled
Summary: Javacript contextmenu event not fired when e10s enabled → Javascript contextmenu event not fired when e10s enabled
Comment 1•8 years ago
|
||
Mike, can you take a look here?
tracking-e10s:
--- → +
Component: Untriaged → DOM: Events
Keywords: regression,
regressionwindow-wanted
OS: Unspecified → Windows
Product: Firefox → Core
Comment 3•8 years ago
|
||
So, breaking the contextmenu event is a big deal, IMO. However, I can't reproduce in this TC in DevEdition 50 on Mac. Is the sync XHR part crucial to the test case?
Flags: needinfo?(miket) → needinfo?(ozzob1)
I'm able to reproduce the issue with FF49/52 on Win 7. I tested FF40/45 with e10s enabled too, same issue, so I don't think it's a regression.
Keywords: regression,
regressionwindow-wanted
Updated•8 years ago
|
status-firefox49:
--- → affected
status-firefox50:
--- → affected
status-firefox51:
--- → affected
status-firefox52:
--- → affected
Assignee | ||
Comment 5•8 years ago
|
||
Seems that this issue is only reproducible on Windows (49.0.1) with e10s enabled, I cannot reproduce it on Mac nor Linux Ubuntu. If I remove the sync XHR part, the issue is gone: the contextmenu event is fired, and the context menu is shown.
Assignee | ||
Comment 6•8 years ago
|
||
After digging in more, it seems that we suppress input events during synchronous XHR (see bug 333198), but I am not sure why only some events are added to the delayed event queue when events are suppressed. Olli, could you shed some light here? Thanks. Note that this happens only on Windows, because Windows shows context menu on mouseup, and other platforms show it on mousedown. I can reproduce this on osx + nightly (but not on official 49, weird) if I change the testcase calling syncSend() on mousedown.
Flags: needinfo?(bugs)
Comment 7•8 years ago
|
||
Only the very minimal set of input events are being suppressed. Perhaps we're missing something there. But why did e10s break this?
Flags: needinfo?(bugs)
Assignee | ||
Comment 8•8 years ago
|
||
(In reply to Olli Pettay [:smaug] from comment #7) > Only the very minimal set of input events are being suppressed. Perhaps > we're missing something there. > But why did e10s break this? It seems that it only happens in e10s due to timing of event processing. From my manual tests, in non-e10s, on mouseup, XML will suppress [1] and unsuppress[2] events, before eContextMenu is processed in nsPressShell [3]. But in e10s, eContentMenu is dispatched to content process and handled in nsPressShell before XML unsupresses events. By adding eContextMenu in the delayed event queue seems to solve this, but I am not really familiar with the code to know what events should (not) be added to the delayed event queue... [1] http://hg.mozilla.org/mozilla-central/file/dc89484d4b45/dom/xhr/XMLHttpRequestMainThread.cpp#l2926 [2] http://hg.mozilla.org/mozilla-central/file/dc89484d4b45/dom/xhr/XMLHttpRequestMainThread.cpp#l2961 [3] http://hg.mozilla.org/mozilla-central/file/dc89484d4b45/layout/base/nsPresShell.cpp#l7731
Flags: needinfo?(bugs)
Comment 9•8 years ago
|
||
Adding eContextMenu to delayed events sounds ok to me.
Flags: needinfo?(bugs)
Assignee | ||
Comment 10•8 years ago
|
||
Attachment #8802432 -
Flags: review?(bugs)
Updated•8 years ago
|
Attachment #8802432 -
Flags: review?(bugs) → review+
Assignee | ||
Comment 11•8 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=aa68fef276dc
Assignee: nobody → jjong
Keywords: checkin-needed
Comment 12•8 years ago
|
||
Pushed by cbook@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/bbea63ccda87 add contextmenu event to the delayed event queue if it's suppressed. r=smaug
Keywords: checkin-needed
Comment 13•8 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/bbea63ccda87
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla52
You need to log in
before you can comment on or make changes to this bug.
Description
•