Closed Bug 1668405 Opened 4 years ago Closed 4 years ago

Duplicate keys can be registered with browser.commands.update()

Categories

(WebExtensions :: Untriaged, enhancement)

Firefox 81
enhancement

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1654403

People

(Reporter: fixmebug, Unassigned)

Details

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:81.0) Gecko/20100101 Firefox/81.0

Steps to reproduce:

browser.commands.update({
name: "_execute_browser_action",
shortcut: "Ctrl+Shift+S”
}).then(() => {
console.log("OK");
}).catch(e => {
console.log(e.message);
});

==> OK

Actual results:

Ctrl+Shift+S is assigned to the Open the Firefox Screenshots UI, but registering with browser.commands.update() does not result in an error. On the other hand, if you try to register Ctrl+Shift+S to an add-on on the shortcut key management page of about: addons, an error will occur.

Expected results:

Shouldn't it return an error like about:addons if you try to register a shortcut key already used by Firefox or other add-ons using browser.commands.update()?

Bugbug thinks this bug should belong to this component, but please revert this change in case of error.

Component: Untriaged → Add-ons Manager
Product: Firefox → Toolkit
Summary: Duplicate keys can be registered with browser.commands.update (). → Duplicate keys can be registered with browser.commands.update()
Component: Add-ons Manager → Untriaged
Product: Toolkit → WebExtensions

I'm going to comment on bug 1654403

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.