diff --git a/js/utils/gestures.js b/js/utils/gestures.js index 65e61f31fc1..ab921e3d202 100644 --- a/js/utils/gestures.js +++ b/js/utils/gestures.js @@ -1089,7 +1089,6 @@ // do a single tap if(!did_doubletap || inst.options.tap_always) { - ionic.tap.cancelClick(); ionic.Gestures.detection.current.name = 'tap'; inst.trigger('tap', ev); } diff --git a/js/utils/tap.js b/js/utils/tap.js index a6eaf1a295a..c64f886bc8c 100644 --- a/js/utils/tap.js +++ b/js/utils/tap.js @@ -155,7 +155,8 @@ ionic.tap = { (e.target.isContentEditable) || (/^(file|range)$/i).test(e.target.type) || (e.target.dataset ? e.target.dataset.preventScroll : e.target.getAttribute('data-prevent-default')) == 'true' || // manually set within an elements attributes - (!!(/^(object|embed)$/i).test(e.target.tagName)); // flash/movie/object touches should not try to scroll + (!!(/^(object|embed)$/i).test(e.target.tagName)) || // flash/movie/object touches should not try to scroll + ionic.tap.isElementTapDisabled(e.target); // check if this element, or an ancestor, has `data-tap-disabled` attribute }, isTextInput: function(ele) { @@ -224,7 +225,11 @@ ionic.tap = { if(!ele || ele.disabled || (/^(file|range)$/i).test(ele.type) || (/^(object|video)$/i).test(ele.tagName) ) { return true; } - if(ele.nodeType === 1) { + return ionic.tap.isElementTapDisabled(ele); + }, + + isElementTapDisabled: function(ele) { + if(ele && ele.nodeType === 1) { var element = ele; while(element) { if( (element.dataset ? element.dataset.tapDisabled : element.getAttribute('data-tap-disabled')) == 'true' ) {