Opened 12 years ago

Closed 12 years ago

#11618 closed defect (wontfix)

dijit._CssStateMixin should check for existence of nodes before tracking mouse state

Reported by: jasonwain Owned by: anonymous
Priority: high Milestone: tbd
Component: Dijit Version: 1.5
Keywords: Cc:
Blocked By: Blocking:


if you override the template for a class that mixes in the _CssStateMixin and don't include one of the nodes that is declared in cssStateNodes, _CssStateMixin will still try to register event listeners for the undefined node (this[ap] on line 55).

its an easy workaround to also override cssStateNodes, but _CssStateMixin should probably have that check either way.

fyi, specifically, this occurred when extending dijit.Dialog and using a template without a closeButtonNode - after showing a dialog, there are dojo errors inside dojo.removeClass any time you click anywhere on the page.

Change History (1)

comment:1 Changed 12 years ago by bill

Component: GeneralDijit
Resolution: wontfix
Status: newclosed

OTOH that would mask errors people make in their cssStateNodes array / templates.

In 2.0 most/all of the CssStateMixin code will go away, specifically the parts monitoring hover and focus, as that will be handled via CSS pseudo-selectors :focus and :hover (and IE6/7 will simply degrade gracefully).

Until then, I'd rather not change CssStateMixin, although I do see your point.

Note: See TracTickets for help on using tickets.