Closed Bug 1292053 Opened 8 years ago Closed 4 years ago

[e10s] ALT keys ignore prevent default

Categories

(Core :: XUL, defect, P2)

Desktop
Windows
defect

Tracking

()

RESOLVED FIXED
Tracking Status
e10s + ---
firefox-esr78 --- wontfix
firefox83 --- wontfix
firefox84 --- wontfix
firefox85 --- fixed

People

(Reporter: r.chrzanowski, Assigned: masayuki)

References

()

Details

Attachments

(1 obsolete file)

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.106 Safari/537.36 OPR/38.0.2220.41 Steps to reproduce: 1. Open a webpage with JS code addEventListener('keydown', function(e){ console.log(e.keyCode); if(e.keyCode == 114 || e.keyCode == 118|| e.keyCode == 121|| e.keyCode == 122 || e.keyCode == 18){ console.log('prevent'); e.preventDefault(); } }, true) 2. Press keys listed in if() parenthesis Actual results: Some keys ignore e.preventDefault. (F7 - 118; F10 - 121; alt - 18) Other keys are prevented from running their default action (F3 - 114; F10 - 122) Expected results: All keys should have been prevented from running their default action. Or is it an intended change in Firefox 48?
Component: Untriaged → Keyboard Navigation
Sorry, bad diagnosis again,
Summary: ALT, F7 and F10 keys ignore prevent default → [e10s] ALT, F7 and F10 keys ignore prevent default
Version: 48 Branch → 49 Branch
Sorry, bad diagnosis again, it seems to just affect multiprocess windows in e10s...
Using F7 as an example (implemented as a system keypress <handler> in browser.xml), this handler is called before the keydown listener on the page. Masayuki should be able to investigate this.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Hmm, I'm working on similar bug of <key> elements at bug 1257617. However, I have no idea to do similar fix for normal key event handler of JS. I guess that we need to add an API to wait a reply from content process and listen "test keydown" event which will be added by bug 1257617.
Depends on: 1257617
I recommend that if it's possible keyboard event handlers in chrome should use XUL <key> elements as far as possible. Using normal keyboard event listeners will increase the implementation cost.
Both <key> elements and <handler event="key..."> go through nsXBLWindowKeyHandler so we should be able to have the same or similar fix for both no? Also, I didn't investigate the other keys mentioned in this bug (F10 and Alt) which I suspect has to do with the way accesskeys and menus have a complex interaction.
(In reply to Neil Deakin from comment #6) > Both <key> elements and <handler event="key..."> go through > nsXBLWindowKeyHandler so we should be able to have the same or similar fix > for both no? Oh, really? If so, it's very good news to me. Then, this must be fixed by bug 1257617 too.
tracking-e10s: --- → +
Priority: -- → P2
F10 key will be fixed by bug 1347351.
Depends on: 1347351
No longer depends on: 1257617
Hmm, I can confirm the Alt key issue. But I cannot reproduce F7 key issue. Was the implementation was changed?
Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Okay, we should treat only Alt key handling here. Please file a new bug if you still see this bug with F7.
Component: Keyboard Navigation → XP Toolkit/Widgets: Menus
Product: Firefox → Core
Summary: [e10s] ALT, F7 and F10 keys ignore prevent default → [e10s] ALT keys ignore prevent default
Version: 49 Branch → Trunk
Comment on attachment 8886634 [details] Bug 1292053 - nsMenuBarListener::KeyDown() and nsMenuBarListener::KeyUp() should wait reply even from remote process if it's necessary Canceling the review until fixing bug 1292053.
Attachment #8886634 - Flags: review?(bugs)
Comment on attachment 8886634 [details] Bug 1292053 - nsMenuBarListener::KeyDown() and nsMenuBarListener::KeyUp() should wait reply even from remote process if it's necessary This caused the new orange. Sorry for the bug spam.
Attachment #8886634 - Flags: review-
Attachment #8886634 - Attachment is obsolete: true
Masayuki, this is the bug I mentioned yesterday about not being able to prevent Alt from triggering the menu, even on keyup.
Ah, I forgot this bug...
Component: XP Toolkit/Widgets: Menus → XUL

Are there any plans to get this fixed? My webapp utilizes the standard pan & zoom modifier keys (alt, ctrl, shift), but these modifiers are made inconsistent by the menu being triggered onkeyup.

Resetting assignee which I don't work on in this several months.

Assignee: masayuki → nobody
Status: ASSIGNED → NEW

This might be related to #1574057.

Will be fixed by the patch for bug 1335347.

Assignee: nobody → masayuki
Status: NEW → ASSIGNED
Depends on: 1335347
OS: Unspecified → Windows
Hardware: Unspecified → Desktop

This was fixed by bug 1335347 and it contains a test for this case.

Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Flags: in-testsuite+
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: