From 311967991c7adb493e48ea575be2b39a8047415d Mon Sep 17 00:00:00 2001 From: Changwang Zhang Date: Tue, 3 Nov 2015 16:24:30 +0800 Subject: [PATCH] Let tapIgnoreEvent check data-tap-disabled. This fix enables the data-tap-disabled tag to completely bypass tap handling for designated elements. This is a bug fix for https://github.com/driftyco/ionic/issues/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. --- js/utils/tap.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/utils/tap.js b/js/utils/tap.js index ba87873cafb..e27c1a2778e 100644 --- a/js/utils/tap.js +++ b/js/utils/tap.js @@ -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();