Closed Bug 1878051 Opened 4 months ago Closed 9 days ago

Hover effect is active while having a context menu opened

Categories

(Firefox :: Tabbed Browser, defect, P1)

defect

Tracking

()

VERIFIED FIXED
128 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox122 --- unaffected
firefox123 --- unaffected
firefox124 --- wontfix
firefox128 --- verified

People

(Reporter: bmaris, Assigned: jswinarton)

References

(Blocks 1 open bug)

Details

(Whiteboard: thp-release-blocker)

Attachments

(2 files)

Found in

  • Latest Nightly 124.0a1

Affected versions

  • Latest Nightly 124.0a1

Tested platforms

  • Affected platforms: Windows 11, Ubuntu 22.04
  • Unaffected platforms: MacOS 13 (even though something similar happens there as well, more details bellow).

Preconditions

  • Have the Tab Hover feature active with browser.tabs.cardPreview.enabled as true in about:config

Steps to reproduce

  1. Open two websites in two different tabs.
  2. Right click on the tab there is no focus on.
  3. Hover over the same tab where the context menu is opened.

Expected result

  • Hover effect is not active while context menu is opened.

Actual result

  • Hover preview can still be used while having a context menu opened in the browser thus it is possible to have the hover overlap the context menu (Ubuntu) or the hover can be overlapped by the context menu (Windows).

Regression range

  • Not a regression since this is reproducible on old Nightly build from 2024-01-13 where this feature officially landed.

Additional notes

  • On Chrome and Firefox (Mac) the hover effect is disabled if having a context menu opened.
  • In Firefox (mac included) the hover is also enabled if having hamburger menu opened, not in Chrome though. In Chrome the hover effect is active if Music control or Extensions menus are open but not their "hamburger" menu. We need to have a consistent behavior here I think.
  • Probably this is not a specific Tabbed Browser issue but it does negatively affect this feature imho.
Blocks: 1848157

:bmaris, if you think that's a regression, could you try to find a regression range using for example mozregression?

Priority: -- → P1
Assignee: nobody → jswinarton

This appears to be an overall issue with context menus in Firefox, I'm not sure I agree with this being classified as a tab preview issue (though the existence of tab preview certainly makes it more obvious).

On MacOS, when a context menu is open, all browser interactivity is disabled -- this includes not only elements of the chrome but the interactive elements in the content area. For example, if you open a context menu on a Bugzilla page and then hover the mouse over the row of links in the top nav (Browse, Advanced Search, etc), nothing happens. Without the context menu, they change colour on hover.

This behaviour is implemented correctly by Edge and Chrome on Windows -- only Firefox is the outlier here. I have not tested on Ubuntu.

This bug is a THP release blocker.

Whiteboard: thp-release-blocker

I still think that the best option is to fix the underlying issue with the context menu itself, so that all interactivity in the browser is disabled while the context menu is open. Since this outside the scope of tab hover preview I have filed bug1897220 to address this. In my opinion the behaviour on Windows and Ubuntu should be identical to MacOS.

That said, we can still address this directly within THP to unblock this, so I am going to work on a local solution that disables the tabstrip on context menu. I will add an additional ticket to remove this code once 1897220 is addressed.

Attachment #9402312 - Attachment description: WIP: Bug 1878051: Suppress tab hover preview on contextmenu → WIP: Bug 1878051: Prevent THP from opening if panels or contextmenus open
Attachment #9402312 - Attachment description: WIP: Bug 1878051: Prevent THP from opening if panels or contextmenus open → Bug 1878051: Prevent THP from opening if panels or contextmenus open r?dwalker
Blocks: 1889646
Pushed by dwalker@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e0b0d70fe948
Prevent THP from opening if panels or contextmenus open r=dwalker,tabbrowser-reviewers
Status: NEW → RESOLVED
Closed: 9 days ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch

Checking on latest Nightly 128.0a1 from today across platforms (macOS 13, Windows 11 and Ubuntu 22.04) the mouse hover is still active but indeed the tab preview is not displayed anymore while the context menu is active which does fix the issue described here. Even though it's not a final solution since all the other tooltips from different buttons will still work, but that's work that will be done in bug 1897220. Closing this one as verified fixed.

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

Attachment

General

Created:
Updated:
Size: