CellList + NoSelectionModel - can we get visual feedback on click?

89 views
Skip to first unread message

markww

unread,
Sep 7, 2012, 2:51:44 PM9/7/12
to google-we...@googlegroups.com
Hi,

I've got a CellList. I am using a NoSelectionModel strategy (I just want the user to click an item in the list without any visual statefulness).

When an item is clicked, the list doesn't provide any visual feedback. Can we do this via css (something like set a mouse-down style for a cell?).

Secondly, when the mouse is released, then I do get a visual change in the list, a row changes color like so:


but this is exactly what I want to prevent by using a NoSelectionModel strategy. My list doesn't have a concept of "selected". How can I prevent that visual state from happening after a click?

Thanks

Thomas Broyer

unread,
Sep 8, 2012, 6:35:33 AM9/8/12
to google-we...@googlegroups.com


On Friday, September 7, 2012 8:51:44 PM UTC+2, markww wrote:
Secondly, when the mouse is released, then I do get a visual change in the list, a row changes color like so:


but this is exactly what I want to prevent by using a NoSelectionModel strategy. My list doesn't have a concept of "selected". How can I prevent that visual state from happening after a click?

This is the "visual feedback"  for the "keyboard selected" row. In other words, an accessibility feature (try using the up/down arrow keys to move to another row, and then the enter key –or is it the space key?– to select it, triggering the NoSelectionModel event handlers).
You might be interested by the KeySelectionPolicy, but keep in mind the implications on accessibility.

markww

unread,
Sep 8, 2012, 5:17:18 PM9/8/12
to google-we...@googlegroups.com
Understood, but is there a way to change the background color of my cell on a click?

If I give my cells an :active css style, the background color unfortunately changes as soon as the user clicks the cell. Rather I want it to only change color after a true click is complete.

Thank you
Reply all
Reply to author
Forward
0 new messages