Permalink
Browse files

get iscroll to work with form fields

  • Loading branch information...
1 parent 0398d2a commit 1089b45846555f0be6ae7db177770a250ee7b27d @hellogerard committed Apr 1, 2011
Showing with 12 additions and 2 deletions.
  1. +6 −1 src/iscroll-lite.js
  2. +6 −1 src/iscroll.js
View
@@ -192,6 +192,11 @@ iScroll.prototype = {
that.moved = false;
+ if ( e.target.tagName == "SELECT" || e.target.tagName == "INPUT"
+ || e.target.tagName == "BUTTON" || e.target.tagName == "TEXTAREA") {
+ return true;
+ }
+
e.preventDefault();
that.moved = false;
@@ -564,4 +569,4 @@ var has3d = 'WebKitCSSMatrix' in window && 'm11' in new WebKitCSSMatrix(),
if (typeof exports !== 'undefined') exports.iScroll = iScroll;
else window.iScroll = iScroll;
-})();
+})();
View
@@ -281,6 +281,11 @@ iScroll.prototype = {
that.moved = false;
+ if ( e.target.tagName == "SELECT" || e.target.tagName == "INPUT"
+ || e.target.tagName == "BUTTON" || e.target.tagName == "TEXTAREA") {
+ return true;
+ }
+
e.preventDefault();
if (hasTouch && e.touches.length == 2 && that.options.zoom && hasGesture && !that.zoomed) {
@@ -1046,4 +1051,4 @@ var has3d = 'WebKitCSSMatrix' in window && 'm11' in new WebKitCSSMatrix(),
if (typeof exports !== 'undefined') exports.iScroll = iScroll;
else window.iScroll = iScroll;
-})();
+})();

0 comments on commit 1089b45

Please sign in to comment.