Skip to content

Commit

Permalink
Let tapIgnoreEvent check data-tap-disabled.
Browse files Browse the repository at this point in the history
This fix enables the data-tap-disabled tag to completely bypass tap handling for designated elements. 

This is a bug fix for 

#2132
http://forum.ionicframework.com/t/ionic-tap-event-conflicting-with-d3-event/7369
http://stackoverflow.com/questions/30113156/d3-zoom-in-ionic

and more.

Without this fix, the tap event handling of ionic conflicts with d3 and many other js libs.
  • Loading branch information
mleoking authored and mlynch committed Dec 6, 2015
1 parent 27fc24e commit 3119679
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/utils/tap.js
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,10 @@ function tapEnableTouchEvents() {
function tapIgnoreEvent(e) {
if (e.isTapHandled) return true;
e.isTapHandled = true;

if(ionic.tap.isElementTapDisabled(e.target)){
return true;
}

if (ionic.scroll.isScrolling && ionic.tap.containsOrIsTextInput(e.target)) {
e.preventDefault();
Expand Down

0 comments on commit 3119679

Please sign in to comment.