Closed Bug 1822911 Opened 1 year ago Closed 1 year ago

mouse clicks cause HTML/CSS mouseover menus to close on Linux/Ubuntu/XOrg/Pekwm

Categories

(Core :: Widget: Gtk, defect)

Firefox 112
Desktop
Linux
defect

Tracking

()

RESOLVED FIXED
113 Branch
Tracking Status
firefox-esr102 --- unaffected
firefox111 --- wontfix
firefox112 --- fixed
firefox113 --- fixed

People

(Reporter: tricia-github, Assigned: emilio)

References

(Regression)

Details

(Keywords: regression)

Attachments

(2 files)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/112.0

Steps to reproduce:

https://www.w3schools.com/howto/howto_css_dropdown.asp contains an example CSS dropdown / mouseover menu. You hover over the red box and can click on one of the options. On Linux (Ubuntu, X.org, Pekwm) the mouse button down on one of the links causes the menu to disappear.

The event debugger does not report any actual mousemove/mouseout/mouseleave events. The mousedown event is reported against whatever the "background" was.

N.b., this issue is not fully reliable- sometimes the UI element does not disappear and the click/mousedown is registered correctly!

Expected results:

mouseover / dropdown menus should not disappear just due to clicking on them.

OS: Unspecified → Linux
Hardware: Unspecified → Desktop
Summary: mouse clicks cause a mouseleave event that closes HTML/CSS mouseover menus → mouse clicks cause HTML/CSS mouseover menus to close on Linux/Ubuntu/XOrg/Pekwm

The Bugbug bot thinks this bug should belong to the 'Core::DOM: UI Events & Focus Handling' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → DOM: UI Events & Focus Handling
Product: Firefox → Core

Works for me on Ubuntu 22.04, Gnome Wayland session with Firefox Wayland-native (non-XWayland) mode. Also works for me on Ubuntu 22.04 with Gnome X.org session.

I suspect a PeKWM bug.

Can you reproduce the problem on Gnome? (Wayland-native, XWayland, or X.org session)

Flags: needinfo?(tricia-github)

Hi, thanks for taking a look at this. I'm not able to reproduce with metacity on Xorg, so it does seem to be related to how firefox is interacting with the window manager / handling X events. Inspecting with xev, metacity and pekwm are producing a different series of preamble events before the mouse click; metacity produces FocusIn, KeymapNotify, PropertyNotify, PropertyNotify, ButtonPress. Pekwm produces LeaveNotify, EnterNotify, KeymapNotify, ButtonPress.

I'll also pursue with the pekwm dev understanding why Pekwm produces different events here and whether one is more correct than the other..

For what it's worth, this was behaving as I expect under very recent versions of Firefox (108/109), and there has not been a coincident change in pekwm.

Flags: needinfo?(tricia-github)

stransky, are you aware of a change after Firefox 108/109 that could be involved here?

Flags: needinfo?(stransky)
Flags: needinfo?(stransky) → needinfo?(tricia-github)

The issue is reproducible under latest nightly 113.0a1 (2023-03-30)

Here are the results from mozregression --good=2022-12-01 --bad=2023-03-30 -a 'https://www.w3schools.com/howto/howto_css_dropdown.asp':

 7:27.81 INFO: No more integration revisions, bisection finished.
 7:27.81 INFO: Last good revision: 850c9756f206a4e29a7b2720fad6c918ffda33df
 7:27.81 INFO: First bad revision: 9b1c242dc2e0dce955e83320a28227c9817d9d57
 7:27.81 INFO: Pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=850c9756f206a4e29a7b2720fad6c918ffda33df&tochange=9b1c242dc2e0dce955e83320a28227c9817d9d57

The commit in question is named "Fix leave-notify handling on X11 (and stop doing pointer grabbing there).", so certainly seems like a likely to have introduced this behavior.

Flags: needinfo?(tricia-github)
Keywords: regression
Priority: -- → P3
Regressed by: 1798131

:emilio, since you are the author of the regressor, bug 1798131, could you take a look? Also, could you set the severity field?

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)
Component: DOM: UI Events & Focus Handling → Widget: Gtk

The component has been changed since the backlog priority was decided, so we're resetting it.
For more information, please visit auto_nag documentation.

Priority: P3 → --

This looks a lot like bug 1807482. Can you go to about:config and set widget.gtk.grab-pointer to 1 (should be 2), restart, and confirm that fixes it?

If so, can you attach your about:support information? In particular the "Desktop environment" section? Thanks.

Flags: needinfo?(emilio) → needinfo?(tricia-github)
Attached file about:support

Unfortunately the issue seems to remain present even with widget.gtk.grab-pointer set to 1.

Flags: needinfo?(tricia-github)

What about widget.gtk.ignore-bogus-leave-notify?

Flags: needinfo?(tricia-github)

Setting widget.gtk.ignore-bogus-leave-notify to 1 resolves the issue (regardless of the setting for grab-pointer).

Flags: needinfo?(tricia-github)
Assignee: nobody → emilio
Attachment #9326430 - Attachment description: WIP: Bug 1822911 - Ignore bogus leave-notify on pekwm. → Bug 1822911 - Ignore bogus leave-notify on pekwm. r=stransky
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Set release status flags based on info from the regressing bug 1798131

Pushed by ealvarez@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/39c26d370913
Ignore bogus leave-notify on pekwm. r=stransky
Status: ASSIGNED → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 113 Branch

The patch landed in nightly and beta is affected.
:emilio, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox112 to wontfix.

For more information, please visit auto_nag documentation.

Flags: needinfo?(emilio)

Comment on attachment 9326430 [details]
Bug 1822911 - Ignore bogus leave-notify on pekwm. r=stransky

Beta/Release Uplift Approval Request

  • User impact if declined: comment 0
  • Is this code covered by automated tests?: No
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: No
  • If yes, steps to reproduce:
  • List of other uplifts needed: none
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Window manager specific workaround. One-liner.
  • String changes made/needed: none
  • Is Android affected?: No
Flags: needinfo?(emilio)
Attachment #9326430 - Flags: approval-mozilla-beta?

Comment on attachment 9326430 [details]
Bug 1822911 - Ignore bogus leave-notify on pekwm. r=stransky

Approved for 112.0rc2

Attachment #9326430 - Flags: approval-mozilla-beta? → approval-mozilla-release+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: