Browse Source

Merge branch '1.x' into 2.x

Robin Herbots 12 years ago
parent
commit
086bca6e93

+ 1 - 1
build.properties

@@ -7,7 +7,7 @@ distdir = dist
 
 build.major = 2
 build.minor = 1
-build.revision = 16
+build.revision = 17
 
 target = jquery.inputmask.bundle.js
 target.min = jquery.inputmask.bundle.min.js

+ 12 - 12
dist/jquery.inputmask.bundle.js

@@ -3,7 +3,7 @@
 * http://github.com/RobinHerbots/jquery.inputmask
 * Copyright (c) 2010 - 2013 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 2.1.16
+* Version: 2.1.17
 */
 
 (function ($) {
@@ -79,13 +79,13 @@
 
             var iphone = navigator.userAgent.match(/iphone/i) != null;
             var android = navigator.userAgent.match(/android.*safari.*/i) != null,
-	    	android534;
-            //if (android) {
-            //    var browser = navigator.userAgent.match(/safari.*/i);
-            //    var version = parseInt(new RegExp(/[0-9]+/).exec(browser));
-            //    android = (version <= 533);
-            //    android534 = (533 < version) && (version <= 534);
-            //}
+	    	android533;
+            if (android) {
+                var browser = navigator.userAgent.match(/safari.*/i);
+                var version = parseInt(new RegExp(/[0-9]+/).exec(browser));
+                android533 = (version <= 533);
+                //android534 = (533 < version) && (version <= 534);
+            }
 
             var masksets,
 	        activeMasksetIndex = 0;
@@ -683,7 +683,7 @@
                         return { "begin": 0, "end": 0 };
                     }
                     if (npt.setSelectionRange) {
-                        begin = npt.selectionStart;
+                        begin = android533 ? npt.selectionEnd : npt.selectionStart;
                         end = npt.selectionEnd;
                     } else if (document.selection && document.selection.createRange) {
                         range = document.selection.createRange();
@@ -1268,7 +1268,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.1.16
+Version: 2.1.17
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1365,7 +1365,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2012 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.1.16
+Version: 2.1.17
 
 Optional extensions on the jquery.inputmask base
 */
@@ -1858,7 +1858,7 @@ Input Mask plugin extensions
 http://github.com/RobinHerbots/jquery.inputmask
 Copyright (c) 2010 - 2013 Robin Herbots
 Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-Version: 2.1.16
+Version: 2.1.17
 
 Optional extensions on the jquery.inputmask base
 */

File diff suppressed because it is too large
+ 23 - 22
dist/jquery.inputmask.bundle.min.js


File diff suppressed because it is too large
+ 25 - 24
dist/min/jquery.inputmask.js


+ 1 - 1
jquery.inputmask.jquery.json

@@ -8,7 +8,7 @@
 		"inputmask",
 		"mask"
     ],
-    "version": "2.1.16",
+    "version": "2.1.17",
     "author": {
         "name": "Robin Herbots",
         "url": "http://github.com/RobinHerbots/jquery.inputmask"

+ 8 - 8
js/jquery.inputmask.js

@@ -79,13 +79,13 @@
 
             var iphone = navigator.userAgent.match(/iphone/i) != null;
             var android = navigator.userAgent.match(/android.*safari.*/i) != null,
-	    	android534;
-            //if (android) {
-            //    var browser = navigator.userAgent.match(/safari.*/i);
-            //    var version = parseInt(new RegExp(/[0-9]+/).exec(browser));
-            //    android = (version <= 533);
-            //    android534 = (533 < version) && (version <= 534);
-            //}
+	    	android533;
+            if (android) {
+                var browser = navigator.userAgent.match(/safari.*/i);
+                var version = parseInt(new RegExp(/[0-9]+/).exec(browser));
+                android533 = (version <= 533);
+                //android534 = (533 < version) && (version <= 534);
+            }
 
             var masksets,
 	        activeMasksetIndex = 0;
@@ -683,7 +683,7 @@
                         return { "begin": 0, "end": 0 };
                     }
                     if (npt.setSelectionRange) {
-                        begin = npt.selectionStart;
+                        begin = android533 ? npt.selectionEnd : npt.selectionStart;
                         end = npt.selectionEnd;
                     } else if (document.selection && document.selection.createRange) {
                         range = document.selection.createRange();