Closed Bug 1708680 Opened 3 years ago Closed 3 years ago

[Nightly only] Action after context clicking a tab can result in current tab being opened in new window

Categories

(Firefox :: Tabbed Browser, defect, P5)

Firefox 90
ARM64
macOS
defect

Tracking

()

RESOLVED FIXED
Tracking Status
firefox-esr78 --- unaffected
firefox88 --- unaffected
firefox89 --- disabled
firefox90 --- disabled
firefox91 --- affected

People

(Reporter: davehunt, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: [proton-context-menus][foxfooding][internal] [proton-foxfooding])

With browser.proton.enabled set to true, context clicking a tab and then causing the menu to be dismissed can result in the current tab opening in a new window. It seems that the action is somehow triggering the same result as dragging the tab away from the toolbar.

I have been able to reproduce best when selecting one of the "Close Multiple Tabs" menu items, however I have also been able to reproduce by simply dismissing the context menu using the escape key on my keyboard.

Steps to reproduce:

  1. Launch Firefox
  2. Open a second tab
  3. Open a third tab
  4. Context click the second tab
  5. Select Close Multiple Tabs > Close Tabs to Left

Expected result:

  1. First tab is closed

Actual result:

  1. First tab is closed
  2. Second tab opens in new window

I am unable to reproduce with browser.proton.enabled set to false.

Application Basics

Name: Firefox
Version: 90.0a1
Build ID: 20210429214231
Distribution ID:
Update Channel: nightly
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:90.0) Gecko/20100101 Firefox/90.0
OS: Darwin 20.4.0 Darwin Kernel Version 20.4.0: Fri Mar 5 01:14:02 PST 2021; root:xnu-7195.101.1~3/RELEASE_ARM64_T8101
Rosetta Translated: false
Multiprocess Windows: 1/1
Fission Windows: 0/1 Disabled by default
Remote Processes: 4
Enterprise Policies: Inactive
Google Location Service Key: Found
Google Safebrowsing Key: Found
Mozilla Location Service Key: Found
Safe Mode: false

Whiteboard: [proton-context-menus]

Thanks for this report. I'm guessing this is actually related to native mac menus, and it would not reproduce with browser.proton.enabled set to true, but widget.macos.native-context-menus set to false - can you confirm?

Also curious exactly how you're opening the context menu. Do you use ctrl-click (which has a number of nightly-only issues, see regressions + dependencies of bug 1615732)? Or a touchpad action? Or an actual mouse button?

Flags: needinfo?(dave.hunt)

(I haven't been able to reproduce so far, unfortunately, but I'm on 10.15 and it's possible this is big sur specific, or there's some other condition I'm not meeting)

Ah, and of course immediately after posting that, I think I've found reliable STR:

  1. ctrl+mousedown on a tab
  2. move mouse down
  3. release ctrl but not the mouse, then hit escape (I'm guessing other ways of dismissing the menu might also work, but this reproduces reliably for me)

I can't seem to reproduce with either the double-finger tap or click-in-right-corner-of-the-trackpad set up to open the context menu.

This would suggest to me this is another nightly-only bug that is caused by bug 1615732; flipping that pref (dom.event.treat_ctrl_click_as_right_click.disabled to false) should work around it.

Whiteboard: [proton-context-menus] → [proton-context-menus][foxfooding][internal] [proton-foxfooding]

(In reply to :Gijs (he/him) from comment #3)

Ah, and of course immediately after posting that, I think I've found reliable STR:

  1. ctrl+mousedown on a tab
  2. move mouse down
  3. release ctrl but not the mouse, then hit escape (I'm guessing other ways of dismissing the menu might also work, but this reproduces reliably for me)

I can't seem to reproduce with either the double-finger tap or click-in-right-corner-of-the-trackpad set up to open the context menu.

This would suggest to me this is another nightly-only bug that is caused by bug 1615732; flipping that pref (dom.event.treat_ctrl_click_as_right_click.disabled to false) should work around it.

I can confirm that I was using ctrl+click, and that setting dom.event.treat_ctrl_click_as_right_click.disabled to false prevents the unwanted behaviour.

Flags: needinfo?(dave.hunt)
Blocks: 1615732
Summary: Action after context clicking a tab can result in current tab being opened in new window → [Nightly only] Action after context clicking a tab can result in current tab being opened in new window
Priority: -- → P5
Blocks: 1703234

This isn't a proton issue but it's suffering from "post hoc ergo propter hoc" confusion, so we'd best fix it just to un-confuse nightly users. :-\

I think bug 1703518 will have fixed this. Dave, can you confirm? (with dom.event.treat_ctrl_click_as_right_click.disabled set back to the nightly-default of true)

Flags: needinfo?(dave.hunt)

I can confirm that I'm unable to replicate with the pref reset.

Status: NEW → RESOLVED
Closed: 3 years ago
Flags: needinfo?(dave.hunt)
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.