Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14568 closed enhancement (fixed)

Reduce event handlers created by _CssStateMixin

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

Description

_CssStateMixin creates a lot of listeners (3 or more per widget) for tracking hover and active state. For 2.0 I'd like to remove that code and instead use CSS :hover and :active pseudo-classes, but it's hard to remove all the CSS class settings like dijitButtonHover in 1.0, because that would break user's custom CSS.

The code, however, can be modified to create less listeners:

  • monitor for widget level events on dojo.body()
  • for Tree, monitor for hover/unhover on Tree rows at Tree rather than from TreeNode
  • the Menu changes already done in #7111
  • etc.

Change History (4)

comment:1 Changed 8 years ago by bill

In [27504]:

Do monitoring for widget hover/active state from a listenerd on <body>, rather than creating separate listeners for each widget. It's a bit like a "hover manager", similar to the focus manager in focus.js. Improves page-load performance. Refs #14568, #7111 !strict.

comment:12 Changed 8 years ago by bill

In [27512]:

dijitTreeLabelFocused isn't used by the themes anymore, so don't bother setting it. Refs #14568 !strict.

comment:13 Changed 8 years ago by bill

Resolution: fixed
Status: newclosed

In [27513]:

Do monitoring for widget sub-node (ex: slider up/down buttons) hover/active state from a listener on <body>, rather than creating separate listeners for each widget. Further improves page-load performance. Fixes #14568 !strict.

comment:14 Changed 8 years ago by bill

In [28386]:

Re-enable _CssStateMixin to track focus events on widget subnodes since legacy themes (tundra, nihilo, soria) are using that feature for ComboButton's in Toolbars on IE.

Refs #14568, fixes #15196 !strict.

Note: See TracTickets for help on using tickets.