Closed Bug 1700706 Opened 4 years ago Closed 4 years ago

After opening a native context menu in tab content, the first click in the browser chrome is ignored (and mouseover effects don't work)

Categories

(Core :: Widget: Cocoa, defect, P1)

All
macOS
defect

Tracking

()

VERIFIED FIXED
89 Branch
Tracking Status
firefox89 --- verified

People

(Reporter: mstange, Assigned: mstange)

References

Details

(Whiteboard: [proton-context-menus][mac:mr1])

Attachments

(1 file)

Steps to reproduce:

  1. Be on macOS, and set widget.macos.native-context-menus and browser.proton.contextmenus.enabled to true.
  2. Right click somewhere on this page to open a content area context menu.
  3. Dismiss the menu by clicking somewhere else on this page, outside the menu.
  4. Move your mouse over a toolbar button in the toolbar at the top.
  5. Click a toolbar button, for example the hamburger button.

Expected results:
In step 4, hover effects should work. In step 5, the click should work.

Actual results:
Neither hover effects nor the click work. But once you've clicked somewhere, they start to work again.
Hover effects and clicks inside tab content still work.

This bug does not happen if the right click in step 2 happens in the chrome, or if the menu is dismissed by clicking a draggable part of the window in step 3.

Whiteboard: [proton-context-menus][mac:mr1]

This is copied from the nsMenuPopupFrame::ShowPopup just a few lines below.
The native menu consumes mouseup events so we need to clear :active and capturing content just before opening the menu.

Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/8d542254e789 Clear active and capturing content before opening native menus. r=tnikkel
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → 89 Branch

Reproduced the issue mentioned in comment 0 using a 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.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: