Closed Bug 1347351 Opened 8 years ago Closed 7 years ago

[e10s] F10 brings up Menu ToolBar in non-touchscreen computers, even when handling and stopping the propagation of the event

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: npokal, Assigned: masayuki)

References

(Depends on 1 open bug, )

Details

(Keywords: testcase)

Attachments

(2 files, 1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36 Steps to reproduce: I created a simple HTML page that will listen for the keydown event. When the key is F10 it will prevent the default and stop the propagation of the event. Actual results: On touch screen computers this works as it should but on non-touchscreen computers the menu toolbar opens up. This causes the focus to leave the document. Expected results: the menu toolbar should not open.
Can you provide the simple HTML page?
Component: Untriaged → Event Handling
Flags: needinfo?(npokal)
Keywords: testcase-wanted
Product: Firefox → Core
Attached file index.html (obsolete) (deleted) —
This is the HTML file it links to a js file called f10.js which i can also upload.
(In reply to YF (Yang) from comment #1) > Can you provide the simple HTML page? I attached the HTML file. The below is the JS that I currently am running. I placed it in a file called f10.js. I dont know if you guys allow uploading JS files so I will just copy and paste it below: document.addEventListener('keydown', function(event){ var keyCode = event.keyCode; var input = document.getElementsByTagName('input'); if (keyCode == 121){ event.preventDefault(); event.stopPropagation(); input[0].value = 'You pressed F10'; } else { input[0].value = 'Hit F10.' } }, false);
Flags: needinfo?(npokal)
Attached file testcase (deleted) —
Attachment #8847366 - Attachment is obsolete: true
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: dupeme
Summary: F10 brings up Menu ToolBar in non-touchscreen computers, even when handling and stopping the propagation of the event → [e10s] F10 brings up Menu ToolBar in non-touchscreen computers, even when handling and stopping the propagation of the event
Masayuki, is this related to bug 1347079?
Flags: needinfo?(masayuki)
Priority: -- → P3
No, but must be fixed when I fix bug 1257617.
Depends on: 1257617
Flags: needinfo?(masayuki)
I misunderstood around the implementation of menubar. I can fix this bug quickly.
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Component: Event Handling → XP Toolkit/Widgets: Menus
OS: Unspecified → All
Hardware: Unspecified → All
Version: 52 Branch → Trunk
Comment on attachment 8886633 [details] Bug 1347351 - nsMenuBarListener::KeyPress() should wait reply event for handling F10 key Hmm, this causes new orange.
Attachment #8886633 - Flags: review?(bugs) → review-
Comment on attachment 8886633 [details] Bug 1347351 - nsMenuBarListener::KeyPress() should wait reply event for handling F10 key Oops, sorry for the bug spam. This patch is fine.
Attachment #8886633 - Flags: review- → review?(bugs)
Comment on attachment 8886633 [details] Bug 1347351 - nsMenuBarListener::KeyPress() should wait reply event for handling F10 key https://reviewboard.mozilla.org/r/157396/#review163222
Attachment #8886633 - Flags: review?(bugs) → review+
Depends on: 1333459
No longer depends on: 1257617
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/ec113974cdd9 nsMenuBarListener::KeyPress() should wait reply event for handling F10 key r=smaug
We're sorry, Autoland could not rebase your commits for you automatically. Please manually rebase your commits and try again. hg error in cmd: hg rebase -s a450755d89bc -d ec113974cdd9: rebasing 408758:a450755d89bc "Bug 1347351 - nsMenuBarListener::KeyPress() should wait reply event for handling F10 key r=smaug" (tip) merging layout/xul/nsMenuBarListener.cpp warning: conflicts while merging layout/xul/nsMenuBarListener.cpp! (edit, then use 'hg resolve --mark') unresolved conflicts (see hg resolve, then hg rebase --continue)
Backed out for bustage at nsMenuBarListener.cpp:336: 'class mozilla::WidgetKeyboardEvent' has no member named 'MaybePostedToRemoteProcessLater': https://hg.mozilla.org/integration/autoland/rev/46b12a5d51b89a211ea788909ec7e366f8e6ed0b Push with bustage: https://treeherder.mozilla.org/#/jobs?repo=autoland&revision=ec113974cdd9a44fa035a2c69678cad9fc28d35b&filter-resultStatus=testfailed&filter-resultStatus=busted&filter-resultStatus=exception&filter-resultStatus=retry&filter-resultStatus=usercancel&filter-resultStatus=runnable Build log: https://treeherder.mozilla.org/logviewer.html#?job_id=116734338&repo=autoland [task 2017-07-23T15:40:39.639414Z] 15:40:39 INFO - In file included from /home/worker/workspace/build/src/obj-firefox/layout/xul/Unified_cpp_layout_xul1.cpp:38:0: [task 2017-07-23T15:40:39.639529Z] 15:40:39 INFO - /home/worker/workspace/build/src/layout/xul/nsMenuBarListener.cpp: In member function 'nsresult nsMenuBarListener::KeyPress(nsIDOMEvent*)': [task 2017-07-23T15:40:39.639611Z] 15:40:39 INFO - /home/worker/workspace/build/src/layout/xul/nsMenuBarListener.cpp:336:29: error: 'class mozilla::WidgetKeyboardEvent' has no member named 'MaybePostedToRemoteProcessLater' [task 2017-07-23T15:40:39.639657Z] 15:40:39 INFO - if (nativeKeyEvent->MaybePostedToRemoteProcessLater()) { [task 2017-07-23T15:40:39.639688Z] 15:40:39 INFO - ^ [task 2017-07-23T15:40:39.639740Z] 15:40:39 INFO - /home/worker/workspace/build/src/config/rules.mk:1050: recipe for target 'Unified_cpp_layout_xul1.o' failed [task 2017-07-23T15:40:39.639777Z] 15:40:39 INFO - gmake[5]: *** [Unified_cpp_layout_xul1.o] Error 1
Flags: needinfo?(masayuki)
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/60566dab0b59 nsMenuBarListener::KeyPress() should wait reply event for handling F10 key r=smaug
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
Flags: needinfo?(masayuki)
Component: XP Toolkit/Widgets: Menus → XUL
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: