Closed Bug 1703518 Opened 4 years ago Closed 3 years ago

[Nightly + macOS-only] With native context menus enabled the drag image blinks when clicking "Reload Tab" menu, if using Ctrl-click to open the tab context menu

Categories

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

Firefox 89
All
macOS
defect

Tracking

()

RESOLVED FIXED
92 Branch
Tracking Status
firefox-esr78 --- unaffected
firefox-esr91 --- disabled
firefox90 --- disabled
firefox91 --- disabled
firefox92 --- fixed

People

(Reporter: suishouen, Assigned: mstange)

References

(Blocks 1 open bug, Regression)

Details

(Keywords: regression, Whiteboard: [mac:mr1][mac:integration])

Attachments

(2 files)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:89.0) Gecko/20100101 Firefox/89.0

Steps to reproduce:

  1. Set "browser.proton.enabled to true" and "widget.macos.native-context-menus to true"
  2. Launch Nightly
  3. Open any page (e.g. https://www.mozilla.org/en-US/firefox/)
  4. Open tab menu (control click the tab)
  5. Click "Reload Tab"

Actual results:

The drag image blinks.

Expected results:

The drag image should not blink.

The Bugbug bot thinks this bug should belong to the 'Firefox::Menus' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → Menus

Hi Eiichi,
I set up the config settings you mentioned but I am not particularly sure if I can't reproduce the issue or I am not looking at what I should.
Could you make a screen recording when you reproduce it and share it here?
Thanks!

Flags: needinfo?(suishouen)
Attached video Screen Recording Movie (deleted) —

For reference;
When I use Nightly, I always rename 'Firefox Nightly' to 'Namoroka'.
So the name of Application shows 'Namoroka' in the Screen Recording Movie.

Whiteboard: [proton-context-menus]
Severity: -- → S3

When setting "widget.macos.native-context-menus" to "false", this issue doesn't happen.

Flags: needinfo?(suishouen)
Blocks: 34572
Status: UNCONFIRMED → NEW
Component: Menus → Widget: Cocoa
Ever confirmed: true
OS: Unspecified → macOS
Product: Firefox → Core
Hardware: Unspecified → All
Whiteboard: [proton-context-menus] → [proton-context-menus][mac:mr1]
Summary: With native context menus enabled the drag image blinks when clicking "Reload Tab" menu. → With native context menus enabled the drag image blinks when clicking "Reload Tab" menu, if using Ctrl-click to open the tab context menu

This only happens after bug 1615732; turning off dom.event.treat_ctrl_click_as_right_click.disabled makes this problem go away. That pref is only set to true by default on nightly, so we won't have this issue in 89 release.

Blocks: 1615732
Summary: With native context menus enabled the drag image blinks when clicking "Reload Tab" menu, if using Ctrl-click to open the tab context menu → [Nightly + macOS-only] With native context menus enabled the drag image blinks when clicking "Reload Tab" menu, if using Ctrl-click to open the tab context menu

This bug can also lead to accidental tab detaches: Ctrl-click on the tab, and then dismiss the menu by doing a small drag gesture outside the menu over the content area. But, as Gijs said, only on Nightly.

Yeah, this looks like the Ctrl-click triggers a drag session, maybe we should prevent ctrl-click to start a drag session on Mac as it would bring up the context menu.

We have this piece of code to unset capturing content and :active state when the native menu opens, maybe we need something similar for aborting drag detection: https://searchfox.org/mozilla-central/rev/759872688df15a5d6ab305ffe39d90450590bfec/layout/xul/nsXULPopupManager.cpp#820-828

Priority: -- → P2
Whiteboard: [proton-context-menus][mac:mr1] → [proton-context-menus][mac:mr1] [priority:2a]

I now understand from comment 6 that this will not happen in release 89 given that dom.event.treat_ctrl_click_as_right_click.disabled won't be enabled on 89 but at some point later. Removing Proton tracking whiteboad items for this reason

No longer blocks: proton-context-menus
Priority: P2 → --
Whiteboard: [proton-context-menus][mac:mr1] [priority:2a] → [mac:mr1]
Blocks: 1703234
Priority: -- → P2
Whiteboard: [mac:mr1] → [mac:mr1][mac:integration]
Keywords: regression
Regressed by: 1700679
Has Regression Range: --- → yes

I'm not sure if this is a good fix - basically, we want to cancel all effects from a mousedown.
A number of places call both ClearGlobalActiveContent and ReleaseCapturingContent. It seems like
all those places would be interested in canceling drag tracking as well.

The caller I care about for this particular bug is nsXULPopupManager::ShowPopupAsNativeMenu.

Assignee: nobody → mstange.moz
Status: NEW → ASSIGNED
Attachment #9221228 - Attachment description: Bug 1703518 - When clearing the mouse down content, also cancel any drag tracking. r=smaug → Bug 1703518 - Cancel any drag tracking before opening native context menus. r=smaug
Pushed by mstange@themasta.com: https://hg.mozilla.org/integration/autoland/rev/130f10069b56 Cancel any drag tracking before opening native context menus. r=smaug
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 92 Branch

Is this something we should consider for 91?

Flags: needinfo?(mstange.moz)

Probably not worth it - this only affects build with dom.event.treat_ctrl_click_as_right_click.disabled set to true, and that pref is only true by default on Nightly, not on Beta/Release.

Flags: needinfo?(mstange.moz)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: