View Full Version : [FIXED-249] selectedCls defaults not to 'x-item-selected' class

31 Aug 2010, 1:39 PM
Sencha Touch version tested:

0.9 rev 3

only default ext-all.css

Platform tested against:

iOS 3.x


The config option selectedCls of the DataView defaults not to the build in class 'x-item-selected' as documented. It's also not enough to set it: you have copy the definition to your own style definition to get the selection class work. It's the same with the undocumented config option pressedCls: I would expect that the class is enabled by default for the DataView.

Steps to reproduce the problem:

Just build a Dataview and set the singleSelect to true.

The result that was expected:

The items are not highlighted when pressed and not showed as selected.

Debugging already done:


Possible fix:

Copy the original classes or build own classes and set the selectedCls and/or the pressedCls config option to these classes

Jamie Avins
1 Sep 2010, 8:33 AM
Thank you for the report.

6 Sep 2010, 6:38 AM
I have not been able to reproduce this in the latest trunk. In the DataView class the defaults are set like this:

* @cfg {String} selectedCls
* A CSS class to apply to each selected item in the view (defaults to 'x-item-selected').
selectedCls : "x-item-selected",
* @cfg {String} pressedCls
* A CSS class to apply to an item on the view while it is being pressed (defaults to 'x-item-pressed').
pressedCls : "x-item-pressed",

In the list example when you open the developer tools and press/select an item, the classes are correctly being added to the node. Maybe this was broken, and has already been fixed recently. Closing this bug as fixed.