I am trying to improve the support for keyboard navigation in my application, and currently I’m looking at how I can navigate in lists.
Vaadin supports arrow up/down navigation in lists, but there are two problems with that;
- I have to implement my own version of navigation for editable lists
- This navigation sets the selection of the list, which triggers the valueChanged listeners.
I see that if I do table.focus() the first row in the table gets an outline around it, and I can move this outline with ctrl-up/down.
This fires no valueChanged event.
I can then press space, and the row gets selected.
This seems more like the behaviour I would like, but there are still two problems with this:
- I would like this to happen on regular arrow up/down instead of ctrl-arrow up/down
- If the list supports multi-select, pressing space toggles the selection of the current row and doesn’t deselect the others (I would have expected space to set selection and ctrl-space to toggle)
Anyone know if there is a way I can influence this behaviour?