Opened 12 years ago
Closed 12 years ago
#7832 closed task (fixed)
dijit._TreeNode widgets do not have own focused/blured events
Reported by: | alex | Owned by: | bill |
---|---|---|---|
Priority: | high | Milestone: | 1.3 |
Component: | Dijit | Version: | 1.2.0 |
Keywords: | tree, tree node, dijit, api | Cc: | dante, Adam Peller, Becky Gibson |
Blocked By: | Blocking: |
Description
in extending the dijit._TreeNode
class to give it new formatting, I was surprised to find that the _onNodeFocus()
event delegates to the containing tree widget which reaches into the nodes themselves to set and un-set WAI roles and states and the various css rules. This seems poorly factored. It should be the TreeNodes?' responsibility to respond to focus and blur events and set styles accordingly. No backwards-incompatible changes need to be made to make this happen.
Change History (5)
comment:1 Changed 12 years ago by
Milestone: | 1.3 → 1.4 |
---|
comment:2 Changed 12 years ago by
Milestone: | 1.4 → 1.5 |
---|
bumping 1.4 tickets to 1.5, and most 1.3 tickets to 1.4
comment:3 Changed 12 years ago by
Milestone: | 1.5 → 1.3 |
---|---|
Owner: | set to bill |
Status: | new → assigned |
This code is a bit tangled up, and not trivial to fix. Focus is fairly simple but there are two types of "blur" operations:
- in blurNode(), where focus is moved to another TreeNode?
- in _onBlur(), where focus has been moved away from the whole tree
In the former case we are setting tabIndex to -1, but not in the latter case.
It's because Tree has a concept of a currently selected node, same as TabContainer? has a currently selected tab, even when focus is somewhere away from the tree.
comment:4 Changed 12 years ago by
Cc: | Becky Gibson added |
---|
CC'ing becky in case she wants to look over the change I am checking in.
comment:5 Changed 12 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Type: | defect → task |
Refactor completed in [16123].
Looks like it TreeNode? calls Tree._onNodeFocus() so that:
I can see putting the styling code into _TreeNode though.