iScroll4 and :active CSS pseudo-class

Showing 1-1 of 1 messages
iScroll4 and :active CSS pseudo-class AlexBE 5/22/12 8:09 PM

Hi there. I am successfully using iScroll4 on a mobile website but there is a specific issue I can’t find a solution for.

Imagine your demo with simple LIs. Image each LI contains an anchor A ta and there is a css rule like a:active {background:blue} for example. 

Now, when I touch one of the anchors inside the scroller and start scrolling, the a:active rule is triggered and the corresponding anchor stays blue for all the duration of the scroll, which is not the desired effect.

How could I avoid this please ? I still want to be able to scroll by grabbing those elements, but only trigger the active state / appearance when I actually tap the element without scrolling.

Thanks !