Allow commands.update() to un-set a shortcut, disabling the command
Categories
(WebExtensions :: General, enhancement, P3)
Tracking
(firefox74 fixed)
Tracking | Status | |
---|---|---|
firefox74 | --- | fixed |
People
(Reporter: mbugzillam, Assigned: robwu)
References
(Blocks 1 open bug)
Details
(Keywords: dev-doc-complete)
Attachments
(1 file)
Updated•7 years ago
|
Comment 1•7 years ago
|
||
Comment 2•7 years ago
|
||
Comment 3•7 years ago
|
||
Reporter | ||
Comment 4•7 years ago
|
||
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Assignee | ||
Comment 8•6 years ago
|
||
The commands.getAll
method is documented to be empty when a shortcut is not set. In Chrome, this is an empty string, in Firefox it's currently null
. I'm going to fix this by using an empty string, and update commands.update
to accept empty strings as well.
The schema also allows the implementation to distinguish between undefined
/unset and null
values. While it would also have been possible to accept null, I decided to use ""
(empty string) instead, for consistency with the getAll
method.
Any discussion about browser UI to change the shortcut can be moved to bug 1520119.
Assignee | ||
Comment 9•6 years ago
|
||
-
Allow empty string ("") as a value for "shortcut" in the
commands.update API. -
Use an empty string instead of null for an unset shortcut in
commands.getAll
, to match the documented behavior (and for
consistency with Chrome).
Comment 10•5 years ago
|
||
There's a r+ patch which didn't land and no activity in this bug for 2 weeks.
:robwu, could you have a look please?
For more information, please visit auto_nag documentation.
Assignee | ||
Comment 11•5 years ago
|
||
I want to land this together with the work of bug 1520119.
Comment 12•5 years ago
|
||
Comment 13•5 years ago
|
||
bugherder |
Assignee | ||
Comment 14•5 years ago
|
||
Need to document that it is possible to clear a shortcut at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/commands/update
Comment 15•5 years ago
|
||
Comment 16•5 years ago
|
||
The docs say "an empty string to clear the shortcut", is this enough in terms of documentation Rob?
Assignee | ||
Comment 17•5 years ago
|
||
Yes, thanks Richard!
Description
•