From 6f2d6e7c5a775218a0f7424e6bdb0269fd9c7603 Mon Sep 17 00:00:00 2001 From: Adam Bradley Date: Mon, 10 Mar 2014 11:45:15 -0500 Subject: [PATCH] fix(tap): Do not detect taps for input[type=file], closes #652 --- js/ext/angular/test/clickTests.html | 1 + js/utils/poly.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/js/ext/angular/test/clickTests.html b/js/ext/angular/test/clickTests.html index c77d29e9e2d..4ea8e0d3d51 100644 --- a/js/ext/angular/test/clickTests.html +++ b/js/ext/angular/test/clickTests.html @@ -41,6 +41,7 @@
div
+ {{ buttonValue }} - {{ radioModel.data }} diff --git a/js/utils/poly.js b/js/utils/poly.js index d517aed11ce..aa9f1744785 100644 --- a/js/utils/poly.js +++ b/js/utils/poly.js @@ -78,7 +78,7 @@ var ele = target.control || target; - if(ele.disabled) return; + if(ele.disabled || ele.type === 'file') return; console.debug('tapElement', ele.tagName, ele.className); @@ -126,7 +126,7 @@ for(var x=0; x<5; x++) { // climb up the DOM looking to see if the tapped element is, or has a parent, of one of these - // only climb up a max of 5 parents, anything more is probably isn't beneficial + // only climb up a max of 5 parents, anything more probably isn't beneficial if(!ele) break; if( ele.tagName === "INPUT" ||