I would like to know if there is a way to disable click when scrolling in a list (or when sliding). I put an action ng-click in an element <li> in a list. The following just appears in a web browser (it works fine in mobile webview with android) : the user starts scrolling and moving the mouse, when he releases the mouse, the click event trigger.
The same behaviour happen if there is a side menu: if the user click on the list and then slide to reveal the side menu, it will trigger 2 actions: open the menu and trigger a click on the list.
Is there anyway to make a difference between a click which is the consequence of the end of scrolling with the mouse and a “normal” click? For the side menu case, can’t we attach any listners on the list, if we use a side menu?
i just tested the code you have in the codepen, and the click event is consistently firing?
I cam across this posting because I ma having an issue with clicks on hrefs firing off when scrolling through a list and thought the answer might be to just change the hrefs to ng-clicks
It seems like this issues has not really been fixed.
The problems I’m facing at the moment is with iOS momentum.
iOS doesn’t fire any scroll events while the user’s finger are off the screen, but only when user perform a “touchmove”, in addition to another extra event that fires when the scroll actually ends (on momentum scrolling ends).
This interferes with the ionic.scroll.isScrolling helper as it is detected by onScroll. Nevertheless, all my custom attempt to check if the momentum is running (e.g. by watching offsetTop attribute of a key element) have failed.
The only solution I’ve found is to attach a data-tap-disabled to the list container, but this of course will create a laggy experience when taping on a list item.