Closed Bug 236484 Opened 21 years ago Closed 21 years ago

menus in menubar still painted as active after popup is dismissed

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: p_ch, Assigned: p_ch)

Details

Attachments

(2 files)

Step to reproduce with a fresh gtk2 build: - click on a menubar menu - click outside the popup expected: menubar menu state is back to normal current: it is still active... This bug has been revealed by the skin simplifications I've done in menu.css, popup.css in skin/gtk2. It did not appear when we were using the files in skin/win (with the menuitem appearance enabled...) that I have now backed out.
-> 0.9
Target Milestone: --- → Firefox0.9
Attached image another manifestation
This bug appeared after I removed all the references to the attribute "_moz-menuactive" in menu.css. In nsITheme, this attribute controls the state of the menu item gtk widget. What happens is that the style system has no rule involving "_moz-menuactive" and doesn't take into account its changes. Problem goes away when I add a dummy rule: menuitem, menu { border-color:transparent;} even if this rule is superceded by the appearance... I guess that a proper fix would involve getting rid of the attribute "_moz-menuactive" and use the :active state.
Assignee: p_ch → dbaron
Component: Menus → Style System (CSS)
OS: Linux → All
Product: Firefox → Browser
QA Contact: bugzilla → ian
Hardware: PC → All
Target Milestone: Firefox0.9 → ---
Version: unspecified → Trunk
updating summary. I checked in a workaround into skin/gtk2/menu.css: menu[_moz-menuactive="true"], menuitem[_moz-menuactive="true"] { + /* dummy rule to force repainting when _moz-menuactive changes */ + border-color: transparent; /* color: HighlightText; should be fg[PRELIGHT] */ }
Summary: [GTK2] menus in menubar still active after popup is dismissed → menus in menubar still painted as active after popup is dismissed
Um... Isn't this what we have WidgetStateChanged() for? If it uses a magic attribute, it should check it and return true accordingly.
Awesome! patch in a sec
Assignee: dbaron → p_ch
Attached patch patch v1.0Splinter Review
I included also the "focused" attribute that controls the focus state of textbox
Attachment #142973 - Flags: superreview?(bzbarsky)
Attachment #142973 - Flags: review?(bzbarsky)
Comment on attachment 142973 [details] [diff] [review] patch v1.0 r+sr=bzbarsky, but in general you _do_ want to switch to using content state changes for this, I would think... I assume this magic attribute is gtk2-only and hence mac/win/whatever don't need similar patches.
Attachment #142973 - Flags: superreview?(bzbarsky)
Attachment #142973 - Flags: superreview+
Attachment #142973 - Flags: review?(bzbarsky)
Attachment #142973 - Flags: review+
(In reply to comment #8) > I assume this magic attribute is gtk2-only and hence mac/win/whatever don't > need similar patches. yes checked in.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: