Handle shared sidebar context menu actions by command rather than by each panel's menu item id
Categories
(Firefox :: Sidebar, task)
Tracking
()
People
(Reporter: kcochrane, Unassigned)
References
Details
(Whiteboard: [fidefe-sidebar])
Follow-up from bug 2084201.
The sidebar panels (History, Synced Tabs, Open Tabs, Bookmarks) handle their context menus in handleCommandEvent(). Each one switches on the menu item's DOM id. Several items do the same thing in different panels: "Open in New Tab", "Open in New Window", "Open in New Private Window", "Copy Link" and "Bookmark". But each has its own id, so each needs its own case label, and the behaviour is easy to let drift between panels.
Bug 2084201 is an example. "Open in New Tab" from History already respected browser.tabs.loadInBackground, but the Synced Tabs and Bookmarks versions did not. The fix had to touch both sidebar-page.mjs and sidebar-bookmarks.mjs. Bookmarks never reaches the shared handler in SidebarPage. It keeps its own copies of open in tab, open in window, open in private window and copy link. The History and Synced Tabs subclasses also have pass-through cases that only call super.handleCommandEvent(e).
Updated•5 days ago
|
Description
•