Closed
Bug 1325697
Opened 8 years ago
Closed 6 years ago
[commands] shortcut does not work in non-browser windows
Categories
(WebExtensions :: General, defect, P5)
Tracking
(Not tracked)
RESOLVED
INACTIVE
People
(Reporter: robwu, Unassigned)
References
Details
(Whiteboard: [design-decision-approved] triaged)
Steps to reproduce:
1. Install https://addons.mozilla.org/en-US/firefox/addon/disable-ctrl-q-and-cmd-q/
2. Open a non-browser window, e.g. the bookmark manager or the global JS console.
3. Press Ctrl-Q
Expected:
- Browser does not quit.
Actual:
- Browser quits
This issue is not specific to Ctrl-Q, if I use Ctrl-Shift-E instead and use a background page with a browser.commands.onCommand listener, then I also observe that the shortcut is only working in browser windows.
In Chrome, the shortcut even works in non-browser windows such as the devtools.
// manifest.json
{
"name": "Ctrl-E",
"version": "1",
"background": {"scripts":["background.js"]},
"manifest_version": 2,
"commands": {
"some shortcut<": {
"suggested_key": {
"default": "Ctrl+Shift+E"
},
"description": "Some description"
}
}
}
// background.js
chrome.commands.onCommand.addListener(d => console.log(d) );
Updated•8 years ago
|
Whiteboard: [design-decision-needed] triaged
Comment 1•8 years ago
|
||
Hey Rob! This has been added to the agenda for the May 9 WebExtensions API triage. Would you be able to join us?
Wiki: https://wiki.mozilla.org/Add-ons/Contribute/Triage
Agenda: https://docs.google.com/document/d/1q7UD3DxsT5z0lO3EbOyF9Iln32Wg_e9LYMdHZ80BEb4/edit#heading=h.nowgt2eodtsv
Reporter | ||
Comment 2•8 years ago
|
||
I can't make it to today's triage meeting unfortunately.
Updated•8 years ago
|
Flags: needinfo?(amckay)
Comment 3•8 years ago
|
||
The ability to register a shortcut should include "browser", "all" or some identifier like "inspector", adding a new key to the manifest. That would cover this bug.
Adding an identifier like that to a shortcut would also prevent registering a shortcut for "all" when it only has effect in the browser window.
// manifest.json
{
"name": "Ctrl-E",
"version": "1",
"background": {"scripts":["background.js"]},
"manifest_version": 2,
"commands": {
"some shortcut<": {
"suggested_key": {
"default": "Ctrl+Shift+E"
},
"description": "Some description",
"windowtype": "browser"
}
}
}
Comment 4•8 years ago
|
||
Sorry for the slow update. The verdict from the meeting was that this seems like a good idea and no-one raised any objections.
Sounds like if this was implemented, bug 1362147 would also be fixed, so duping that to this.
Flags: needinfo?(amckay)
Priority: -- → P5
Whiteboard: [design-decision-needed] triaged → [design-decision-approved] triaged
Comment 8•6 years ago
|
||
Per policy at https://wiki.mozilla.org/Bug_Triage/Projects/Bug_Handling/Bug_Husbandry#Inactive_Bugs. If this bug is not an enhancement request or a bug not present in a supported release of Firefox, then it may be reopened.
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → INACTIVE
Updated•6 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•