Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#15431 closed defect (fixed)

_CssStateMixin creating incorrect class list

Reported by: Douglas Hays Owned by: bill
Priority: high Milestone: 1.8
Component: Dijit Version: 1.7.2
Keywords: Cc:
Blocked By: Blocking:


Run test_Select.html.
mousedown on any Select widget and you can see the dijitSelectFocused class applied to the arrow button.
mouseup and dijitSelectFocused is incorrectly removed but dijitFocused and various other "Focused" classes remain and the arrow button changes to a non-focused state.
Move the mouse away and the arrow button class is restored.
This worked correctly in 1.7.2.

Change History (5)

comment:1 Changed 10 years ago by Douglas Hays

Milestone: tbd1.8
Owner: set to bill
Priority: undecidedhigh
Status: newassigned

comment:2 Changed 10 years ago by Douglas Hays

Summary: _CssStateMixin creating incorrect class names_CssStateMixin creating incorrect class list

comment:3 Changed 10 years ago by bill

Thanks for catching that. It's a complicated one.

I'll be glad in 2.0 when we use pseudo-selectors like :focus rather than _CssStateMixin to track hover and focus on widget sub nodes... although I guess dijitSelectFocus on the widget root node will remain, as that's a higher-level indicator that focus is either on one of the Select's sub-nodes, or on the Select's drop-down menu.

comment:4 Changed 10 years ago by bill

Resolution: fixed
Status: assignedclosed

In [28695]:

The code to track focus/blur events on widget sub-nodes was unintendedly running for the widget root nodes too.

This was problematic since dijitSelectFocus needs to be set not only when the Select.focusNode has focus, but also when the Select's drop down menu has focus... even though the menu is a child of <body>.

Refs #15196, fixes #15431 !strict

comment:16 Changed 10 years ago by bill

In [28728]:

DOMNode.hasAttribute() isn't available on IE6/7, so use getAttribute() instead, refs #15196, #15431 !strict

Note: See TracTickets for help on using tickets.