Problem
Here is the example, test it on iOS safari please.
In this example, when user touches one anchor, the background of anchor at the touch position will turn gray.
When user scrolls the element, and immediately touches the element to make it stop before it stops by self. The wrong element will turn gray. In fact, the anchor at the touch position before scrolling will turn gray.
Possible Solutions
The best solution is getting the correct anchor at the touch position when touching-stop the scrolling element.
If the correct anchor cannot be gotten, stop gray-turning when touch-stop the scrolling element is accepted. But how can i know whether user is touching-stop the scrolling element or simply tapping? In other words, how can I know whether the element is scrolling?