Closed Bug 1797811 Opened 2 years ago Closed 7 months ago

Migrate user-defined shortcuts from _execute_browser_action to _execute_action

Categories

(WebExtensions :: General, defect, P2)

defect

Tracking

(firefox127 fixed)

RESOLVED FIXED
127 Branch
Tracking Status
firefox127 --- fixed

People

(Reporter: robwu, Assigned: willdurand)

References

(Blocks 1 open bug)

Details

(Keywords: dev-doc-complete, Whiteboard: [wecg][addons-jira])

Attachments

(1 file)

In MV3, the browser_action API has been renamed to the action API (bug 1706398). In Chrome, the action API supersedes even the page_action API (under consideration in bug 1687756).

As part of the rename, the "_execute_browser_action" keyword has been renamed to "_execute_action". Firefox supports this in the commands API *. Users can customize the shortcut registration via UI in about:addons, which is persisted, keyed by the shortcut ID. If extension authors are forced to migrate to _execute_action, then the key changes, and users would lose their customized shortcut.

To avoid the loss of user customizations, we should consider migrating the _execute_browser_action shortcut to _execute_action (or somehow use it as a fallback), at https://searchfox.org/mozilla-central/rev/2d1097c27f31cb15f7588b043d691cda9710d14b/toolkit/components/extensions/ExtensionShortcuts.jsm#292-301.
To avoid the fallback from unexpectedly popping up, we should clear both _execute_browser_action and _execute_action when the shortcut is reset (resetCommand implementation).

* command is also supported in the menus / contextMenus API. I'm not concerned about the menu registrations, because these do not persist beyond extension updates nor browser updates.

Severity: -- → S3
Type: enhancement → defect
Priority: -- → P2
Whiteboard: [wecg] → [wecg][addons-jira]
Assignee: nobody → wdurand
Status: NEW → ASSIGNED
Pushed by wdurand@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/adf333b4e360 Fallback to _execute_browser_action on MV3. r=rpl
Status: ASSIGNED → RESOLVED
Closed: 7 months ago
Resolution: --- → FIXED
Target Milestone: --- → 127 Branch

Should be added to the changelog of Firefox 127 for developers.

Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: