Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

CSS :active pseudo class no longer triggers in 10.1+

by Retired on ‎06-14-2013 02:05 PM (2,246 Views)

Since BlackBerry 10 OS version 10.1, DOM elements no longer trigger their CSS :active pseudo class when touched, unless a 'touchend' event is attached. These no longer trigger when using 'click' events. This was done for performance reasons.


For example, If you are using CSS :acive pseudo class to highlight menu items for example, they will need to change the listeners from:



To keep the code cross-platform (touchend only works on touchscreen devices, not desktop), you can create a little helper function as such:


var clickOrTouch = 'ontouchstart' in window ? ‘touchend’ : ‘click’;

 And then use clickOrTouch instead:



This will query the browser to see if touch is supported and use touched instead of click.

Users Online
Currently online: 4 members 1,414 guests
Recent signins:
Please welcome our newest community members: