gwtproject / gwt

GWT Open Source Project
http://www.gwtproject.org
1.51k stars 372 forks source link

CellBrowser w/ SingleSelectionModel & KeyboardSelectionPolicy.BOUND_TO_SELECTION doesn't deselect child item when keyboard-navigating "shallow" #6174

Closed dankurka closed 9 years ago

dankurka commented 9 years ago

Originally reported on Google Code with ID 6175

Found in GWT Release (e.g. 1.5.3, 1.6 RC):
trunk @ r9848

Encountered on OS / Browser (e.g. WinXP, IE6-7, FF3):
Chrome 11.0.696.16 dev and Firefox 4.0 on Windows XP Pro SP3

Detailed description (please be as specific as possible):
I have a CellBrowser with a SingleSelectionModel (same instance shared by all NodeInfo
in the TreeViewModel) and KeyboardSelectionPolicy set to BOUND_TO_SELECTION.
When navigating "up" using the keyboard (KEY_LEFT in LTR locale), the child item is
still selected.
I traced the selected item using a SelectionChangeEvent.Handler and no event is fired
when navigating up, so it really is the case that the parent item is not selected,
while it is "keyboard selected" and has the focus.

This causes two UX issues:
 - the default style doesn't distinguishes between an "open item" that is "keyboard
selected" and one that isn't, so it's confusing for the user as he has no clue that
his "key left" indeed moved him up the hierarchy;
 - we use the ENTER key to "validate" the current selection (the CellBrowser is in
a DialogBox), which will then validate the "child item" whereas the user wished to
move up and actually select its parent item.

Workaround if you have one:
For the ENTER key, use a CellPreviewEvent.Handler to make it select the currently "keyboard
selected" node.
For the "UX issue" though (maybe the most important one), none.

Reported by t.broyer on 2011-03-22 15:48:02

dankurka commented 9 years ago
Seems to be fixed by r10731

Reported by t.broyer on 2011-11-11 11:11:03

dankurka commented 9 years ago
Bulk edit: should be fixed in the GWT 2.5 release candidate.

Reported by skybrian@google.com on 2012-06-27 03:38:12