You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug: tapIgnoreEvent doesn't check for data-tap-disabled #2132
For various reasons I had to use another scrolling library in one area of my app. To disable the Ionic scroll stuff, I used overflow-scroll="true" on the ion-content and also data-tap-disabled="true" on a container element. However the Ionic tap library was still interfering (causing events not to fire in the other library).
It boiled down to the tapIgnoreEvent method in tap.js:
It's not checking if the element, or a parent, has the "data-tap-disabled" attribute set.
It should be using the isElementTapDisabled method like other tap handlers. Changing first line to the following fixes issues:
function tapIgnoreEvent(e) {
if(e.isTapHandled || ionic.tap.isElementTapDisabled(e.target)) return true;
...
Would you be able to provide a simple codepen replicating the issue. I want to make sure I can break and fix with the same html structure you're using. Thanks
Thanks for taking a look Adam. Ok, sure, I'll try get something together. I'm travelling at the moment though so will be towards end of this week before I can update.
As you'll see I'm using the iScroll library. To repro, focus into one of the text fields and try to scroll up or down. You won't be able to. If you swap the script out to point to my custom version on dropbox which has the change proposed above, it works.
I don't understand why the proposed "fix" was rejected. The documentation states that the "data-tap-disabled" can be used to bypass tap handling for designated elements and that isn't 100% true.
I too have a non-supported use-case (IE Browser for Desktop with HTML5 Video Element whose control clicks are being intercepted by the tap handler), but I don't see why I shouldn't be able to use "data-tap-disabled" sucessfuly.
Activity
adamdbradley commentedon Sep 8, 2014
Would you be able to provide a simple codepen replicating the issue. I want to make sure I can break and fix with the same html structure you're using. Thanks
emertechie commentedon Sep 10, 2014
Thanks for taking a look Adam. Ok, sure, I'll try get something together. I'm travelling at the moment though so will be towards end of this week before I can update.
emertechie commentedon Sep 11, 2014
@adamdbradley Ok got a repro for you here: http://codepen.io/emertechie/pen/sopig/
As you'll see I'm using the iScroll library. To repro, focus into one of the text fields and try to scroll up or down. You won't be able to. If you swap the script out to point to my custom version on dropbox which has the change proposed above, it works.
Ionitron commentedon Mar 11, 2015
We do not recommend using two scroll libraries in the same app.
anemitoff commentedon Apr 9, 2015
I don't understand why the proposed "fix" was rejected. The documentation states that the "data-tap-disabled" can be used to bypass tap handling for designated elements and that isn't 100% true.
I too have a non-supported use-case (IE Browser for Desktop with HTML5 Video Element whose control clicks are being intercepted by the tap handler), but I don't see why I shouldn't be able to use "data-tap-disabled" sucessfuly.
Let tapIgnoreEvent check data-tap-disabled.
Let tapIgnoreEvent check data-tap-disabled.
mlynch commentedon Dec 6, 2015
Fixed in 3119679