Reputation: 33
Hi I'm using jQuery Mobile to build a cross platform mobile app and I have the following issue:
Whenever there is a list with many items, the user scrolls down and when taps to stop the scrolling, the item gets clicked instead of stopping the scroll, what should I do?
Upvotes: 3
Views: 327
Reputation: 1546
I had the same issue, I solved it by creating a flag variable that gets turned off on the stopscroll jqm event.
var tapFlag = true;
$(document).on("scrollstart",function(){
tapFlag = false;
});
$(document).on("scrollstop",function(){
tapFlag = true;
});
and only allow the items to be tapped if the tap flag is true.
Upvotes: 1