With native context menus enabled, the context menu of the bookmarks toolbar has strange contents (too many items, or duplicate items, or empty items, or all items disabled)
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
(3 files)
(deleted),
image/png
|
Details | |
Bug 1700715 - Make document.popupNode work during the popupshowing event for native menus. r=tnikkel
(deleted),
text/x-phabricator-request
|
Details | |
(deleted),
text/x-phabricator-request
|
Details |
Steps to reproduce:
- Be on macOS, and set
widget.macos.native-context-menus
andbrowser.proton.contextmenus.enabled
to true. - Make sure the bookmarks toolbar is shown.
- Right-click on a bookmark or a bookmarks folder in the bookmarks toolbar.
Expected results:
The context menu should contain the items you would expect, and the right items should be enabled.
Actual results:
The menu has odd contents.
Note: If you set one of the prefs to false, open the non-native context menu, and then set them to true again, the native context menu will now contain the correct contents. In that case you can open a new window to reproduce this bug again.
Assignee | ||
Updated•4 years ago
|
Updated•4 years ago
|
Assignee | ||
Comment 1•4 years ago
|
||
With document.popupNode returning something sensible during popupshowing, this is mostly fixed. There's one remaining issue with add-on items being re-added at the end of the popup repeatedly, but I'll file a new bug about that.
Comment 2•4 years ago
|
||
FYI: The same happens in the bookmarks sidebar. Not sure if there will be one fix for both or if it will need a own fix so I wanted to leave a comment here.
Assignee | ||
Comment 3•4 years ago
|
||
Assignee | ||
Comment 4•4 years ago
|
||
This scenario is encountered when the same menu is opened again while it's already open:
nsMenuPopupFrame::InitializePopupAsNativeContextMenu overwrites mNativeMenu with a newly-created
NativeMenu, destroying the old one before it had a chance to fire its popuphiding/popuphidden events.
One place where we do this is if you right-click in the bookmarks bar and then, while the menu is
open, right-click again on the bookmarks bar in a different place.
Since we weren't dispatching popuphiding/popuphidden events for the first menu in this scenario
before this patch, some menu items would be duplicated because their old versions were never removed.
Depends on D110141
Comment 8•4 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/d81d522f8b5e
https://hg.mozilla.org/mozilla-central/rev/80d0a471b517
Comment 9•4 years ago
|
||
Reproduced the issue mentioned in comment 0 using Firefox 89.0a1 (build from 2021-03-24).
This issue is verified fixed using Firefox 89.0a1 (BuildId:20210414160838) on macOS 10.15 with native menus enabled.
Description
•