diff --git a/dist/js/ionic.js b/dist/js/ionic.js index ce2ef5cd1c..2b5ff978a7 100644 --- a/dist/js/ionic.js +++ b/dist/js/ionic.js @@ -1801,63 +1801,6 @@ window.ionic = { })(window.ionic); ; -(function(window, document, ionic) { - - // polyfill use to simulate native "tap" - function inputTapPolyfill(ele, e) { - if(ele.type === "radio" || ele.type === "checkbox") { - ele.checked = !ele.checked; - } else if(ele.type === "submit" || ele.type === "button") { - ele.click(); - } else { - ele.focus(); - } - e.stopPropagation(); - e.preventDefault(); - return false; - } - - function tapPolyfill(e) { - // if the source event wasn't from a touch event then don't use this polyfill - if(!e.gesture || e.gesture.pointerType !== "touch" || !e.gesture.srcEvent) return; - - e = e.gesture.srcEvent; // evaluate the actual source event, not the created event by gestures.js - - var ele = e.target; - - while(ele) { - if( ele.tagName === "INPUT" || ele.tagName === "TEXTAREA" || ele.tagName === "SELECT" ) { - return inputTapPolyfill(ele, e); - } else if( ele.tagName === "LABEL" ) { - if(ele.control) { - return inputTapPolyfill(ele.control, e); - } - } else if( ele.tagName === "A" || ele.tagName === "BUTTON" ) { - ele.click(); - e.stopPropagation(); - e.preventDefault(); - return false; - } - ele = ele.parentElement; - } - - // they didn't tap one of the above elements - // if the currently active element is an input, and they tapped outside - // of the current input, then unset its focus (blur) so the keyboard goes away - var activeElement = document.activeElement; - if(activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA" || activeElement.tagName === "SELECT")) { - activeElement.blur(); - e.stopPropagation(); - e.preventDefault(); - return false; - } - } - - // global tap event listener polyfill for HTML elements that were "tapped" by the user - ionic.on("tap", tapPolyfill, window); - -})(this, document, ionic); -; (function(ionic) { /** diff --git a/js/ext/angular/test/nav.html b/js/ext/angular/test/nav.html index 0c854fd962..9289396f41 100644 --- a/js/ext/angular/test/nav.html +++ b/js/ext/angular/test/nav.html @@ -41,7 +41,8 @@ @@ -79,6 +80,10 @@ console.log('HIDDEN'); }); + $scope.thisThing = function() { + console.log("THIS THING"); + }; + var items = []; for(var i = 0; i < 100; i++) { items.push({}); diff --git a/js/utils/tapPolyfill.js b/js/utils/tapPolyfill.js deleted file mode 100644 index 7756f2c11c..0000000000 --- a/js/utils/tapPolyfill.js +++ /dev/null @@ -1,56 +0,0 @@ -(function(window, document, ionic) { - - // polyfill use to simulate native "tap" - function inputTapPolyfill(ele, e) { - if(ele.type === "radio" || ele.type === "checkbox") { - ele.checked = !ele.checked; - } else if(ele.type === "submit" || ele.type === "button") { - ele.click(); - } else { - ele.focus(); - } - e.stopPropagation(); - e.preventDefault(); - return false; - } - - function tapPolyfill(e) { - // if the source event wasn't from a touch event then don't use this polyfill - if(!e.gesture || e.gesture.pointerType !== "touch" || !e.gesture.srcEvent) return; - - e = e.gesture.srcEvent; // evaluate the actual source event, not the created event by gestures.js - - var ele = e.target; - - while(ele) { - if( ele.tagName === "INPUT" || ele.tagName === "TEXTAREA" || ele.tagName === "SELECT" ) { - return inputTapPolyfill(ele, e); - } else if( ele.tagName === "LABEL" ) { - if(ele.control) { - return inputTapPolyfill(ele.control, e); - } - } else if( ele.tagName === "A" || ele.tagName === "BUTTON" ) { - ele.click(); - e.stopPropagation(); - e.preventDefault(); - return false; - } - ele = ele.parentElement; - } - - // they didn't tap one of the above elements - // if the currently active element is an input, and they tapped outside - // of the current input, then unset its focus (blur) so the keyboard goes away - var activeElement = document.activeElement; - if(activeElement && (activeElement.tagName === "INPUT" || activeElement.tagName === "TEXTAREA" || activeElement.tagName === "SELECT")) { - activeElement.blur(); - e.stopPropagation(); - e.preventDefault(); - return false; - } - } - - // global tap event listener polyfill for HTML elements that were "tapped" by the user - ionic.on("tap", tapPolyfill, window); - -})(this, document, ionic);