Closed
Bug 1253284
Opened 9 years ago
Closed 9 years ago
Cmd+Q isn't reserved on OS X
Categories
(Firefox :: Keyboard Navigation, defect, P4)
Firefox
Keyboard Navigation
Tracking
()
RESOLVED
FIXED
Firefox 49
People
(Reporter: canuckistani, Assigned: m_kato)
References
Details
Attachments
(1 file)
See https://bugzilla.mozilla.org/show_bug.cgi?id=1203059#c52
TL;DR we're reserving certain keybindings for the browser only and need some Firefox code changed to fully support this.
Reporter | ||
Updated•9 years ago
|
tracking-e10s:
--- → ?
Updated•9 years ago
|
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → m_kato
Assignee | ||
Comment 1•9 years ago
|
||
<key id="key_quitApplication" key="&quitApplicationCmdUnix.key;" modifiers="accel"/> has no command attribute, so even if adding reserved="true", it doesn't check this attribute.
Comment 2•9 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #1)
> <key id="key_quitApplication" key="&quitApplicationCmdUnix.key;"
> modifiers="accel"/> has no command attribute, so even if adding
> reserved="true", it doesn't check this attribute.
Is that really not checking?
nsXBLWindowKeyHandler checks the reserved event here:
https://dxr.mozilla.org/mozilla-central/rev/fc15477ce628599519cb0055f52cc195d640dc94/dom/xbl/nsXBLWindowKeyHandler.cpp#604,607-608,613,618-620
But GetElementForHandler() looks like returning key element if there is no proper command element:
https://dxr.mozilla.org/mozilla-central/source/dom/xbl/nsXBLWindowKeyHandler.cpp#717
Assignee | ||
Comment 3•9 years ago
|
||
Review commit: https://reviewboard.mozilla.org/r/51053/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/51053/
Assignee | ||
Comment 4•9 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) (offline: 4/29-5/8) from comment #2)
> (In reply to Makoto Kato [:m_kato] from comment #1)
> > <key id="key_quitApplication" key="&quitApplicationCmdUnix.key;"
> > modifiers="accel"/> has no command attribute, so even if adding
> > reserved="true", it doesn't check this attribute.
>
> Is that really not checking?
>
> nsXBLWindowKeyHandler checks the reserved event here:
> https://dxr.mozilla.org/mozilla-central/rev/
> fc15477ce628599519cb0055f52cc195d640dc94/dom/xbl/nsXBLWindowKeyHandler.
> cpp#604,607-608,613,618-620
>
> But GetElementForHandler() looks like returning key element if there is no
> proper command element:
> https://dxr.mozilla.org/mozilla-central/source/dom/xbl/nsXBLWindowKeyHandler.
> cpp#717
In WalkHandlersAndExecute(), IsExecutableElement() returns false due to no command attribute. So HasHandlerForEvent returns false. Then mIsReserved isn't set to true.
Comment 5•9 years ago
|
||
(In reply to Makoto Kato [:m_kato] from comment #3)
> Created attachment 8749587 [details]
> MozReview Request: Bug 1253284 - Allow reserved attribute without command
> attribute
>
> Review commit: https://reviewboard.mozilla.org/r/51053/diff/#index_header
> See other reviews: https://reviewboard.mozilla.org/r/51053/
Looks good, should I review this?
Assignee | ||
Comment 6•9 years ago
|
||
(In reply to Masayuki Nakano [:masayuki] (Mozilla Japan) (offline: 4/29-5/8) from comment #5)
> (In reply to Makoto Kato [:m_kato] from comment #3)
> > Created attachment 8749587 [details]
> > MozReview Request: Bug 1253284 - Allow reserved attribute without command
> > attribute
> >
> > Review commit: https://reviewboard.mozilla.org/r/51053/diff/#index_header
> > See other reviews: https://reviewboard.mozilla.org/r/51053/
>
> Looks good, should I review this?
I am investigating whether there is another way...
Updated•9 years ago
|
Priority: -- → P4
Comment 7•9 years ago
|
||
Any update on this? Should we proceed with the current patch?
Flags: needinfo?(m_kato)
Assignee | ||
Comment 8•9 years ago
|
||
humm, although I investigated another way like reading attribute or hooking on global menu bar, but no way to hook it.... So we should handle it on nsXBLWindowKeyHandler like my first idea.
Flags: needinfo?(m_kato)
Assignee | ||
Updated•9 years ago
|
Attachment #8749587 -
Flags: review?(masayuki)
Updated•9 years ago
|
Attachment #8749587 -
Flags: review?(masayuki) → review+
Comment 9•9 years ago
|
||
Comment on attachment 8749587 [details]
MozReview Request: Bug 1253284 - Allow reserved attribute without command attribute
https://reviewboard.mozilla.org/r/51053/#review50224
Comment 10•9 years ago
|
||
Comment 11•9 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox49:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 49
You need to log in
before you can comment on or make changes to this bug.
Description
•