Open Bug 741283 Opened 12 years ago Updated 2 years ago

when a menu is open, buttons and links appear active when they are not

Categories

(Core :: XUL, defect)

Other Branch
x86_64
Linux
defect

Tracking

()

People

(Reporter: karlt, Unassigned)

Details

STR:
1) Open a menu on the menu bar, or a context menu, or the "List all tabs" dropdown.
2) Hover the pointer over a link or toolbar button.

Expected results: nothing.
Actual results: the link or button highlights as if it is active.

Clicking the mouse button while the pointer is over an apparently active object does nothing.  This is the correct behavior when nsIWidget::CaptureRollupEvents has been called with aConsumeRollupEvent set.
This bug can't reasonably be fixed (solely) from widget code because preventing the main window from receiving events would prevent the menubar from knowing when to switch from one menu to another (e.g. "File" to "Edit")
I wonder whether the menubar/menu could use https://developer.mozilla.org/en/API/Pointer_Lock_API
Component: DOM: Events → XP Toolkit/Widgets: Menus
QA Contact: events → xptoolkit.menus
Pointer lock wouldn't work. It hides the cursor and changes mouse event handling etc.
pointer-events: none doesn't seem right here as descendants can override that, but perhaps a capturing event listener on a high-level element can stop propagation.
I guess it could check whether the target is the menubar to allow events there, if the menubar is a descendant element.

Or perhaps an invisible element could be thrown on top of the non-menu bar part of the window.  It could even usually have pointer-events: none set so as to have no effect, but that would be changed when the menubar has been opened.

Both feel a little awkward, but I'm leaning towards the former.
Component: XP Toolkit/Widgets: Menus → XUL
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.