With native context menus enabled, right-clicking a bookmark in a bookmarks panel (bookmarks toolbar folder popup or library panel) does not work
Categories
(Core :: Widget: Cocoa, defect, P1)
Tracking
()
Tracking | Status | |
---|---|---|
firefox89 | --- | verified |
People
(Reporter: mstange, Assigned: mstange)
References
Details
(Whiteboard: [proton-context-menus][mac:mr1])
Attachments
(2 files)
Steps to reproduce:
- Be on macOS, and set
widget.macos.native-context-menus
andbrowser.proton.contextmenus.enabled
to true. - Open the bookmarks menu from its toolbar button. Alternatively, open a bookmarks folder panel in the bookmarks toolbar.
- Right click on one of the bookmarks.
Expected results:
A context menu should appear on top of the other menu/panel.
Actual results:
The open menu/panel is dismissed and no context menu opens.
Assignee | ||
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
When this happens, an NS_ERROR_ILLEGAL_VALUE exception is shown on the error console:
"Component returned failure code: 0x80070057 (NS_ERROR_ILLEGAL_VALUE) [nsIXPCComponents_Utils.isDeadWrapper]"
Stack:
PUIU_getViewForNode@resource:///modules/PlacesUIUtils.jsm:393:12
placesContextShowing@resource:///modules/PlacesUIUtils.jsm:1340:28
onpopupshowing@chrome://browser/content/browser.xhtml:1:22
Assignee | ||
Comment 2•4 years ago
|
||
This code accesses document.popupNode). Setting mOpeningPopup
to the menupopup nsIContent during the popupshowing event fixes the console error, but it doesn't fix this bug.
However, it does fix most of bug 1700715.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 3•4 years ago
|
||
The purpose of this code is to close non-native context menus when clicking the
menubar. However, menuWillOpen is also called when opening a native context menu.
And when opening a context menu on top of a non-native menu (e.g. the Downloads
panel or a bookmarks toolbar folder), this code backfires and closes the panel.
Restricting it to the menubar fixes that scenario.
Depends on D110304
Assignee | ||
Comment 4•4 years ago
|
||
We have at least four different pieces of code that try to make sure our
non-native menus get closed in all the scenarios where a native menu would close.
This is one them.
It covers the following case:
- Open a non-native menu, for example a bookmarks toolbar folder.
- Right-click somewhere outside of Firefox to open a native menu from another app.
Now the non-native menu should close.
However, this code doesn't seem to be needed; the same scenario is also covered
by the call to RollUpPopups in [WindowDelegate windowDidResignKey:] (when Firefox
has focus) and by nsCocoaWindow::CaptureRollupEvents (when Firefox does not have
focus - it even installs a global mouse event monitor for this scenario).
So I think we can just remove this code. It causes trouble when opening a native
context menu on top of (inside of) a non-native panel like the Downloads panel or
a bookmarks toolbar folder dropdown.
Depends on D110305
Comment 6•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/457aff295ba2
https://hg.mozilla.org/mozilla-central/rev/84d1c8eb104e
Comment 7•4 years ago
|
||
Reproduced the issue mentioned in comment 0 using Firefox 89.0a1 (build form 2021-03-24).
This issue is verified fixed using Firefox 89.0a1 (BuildId:20210414160838) on macOS 10.15 with native menus enabled.
Description
•