ソースを参照

minor fix on caretposCorrection - android

Robin Herbots 14 年 前
コミット
e48705619a
1 ファイル変更2 行追加2 行削除
  1. 2 2
      jquery.inputmask.js

+ 2 - 2
jquery.inputmask.js

@@ -455,7 +455,7 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                     npt.focus();
                     npt.focus();
                     if (android && end != npt.selectionEnd) caretposCorrection = { begin: begin, end: end };
                     if (android && end != npt.selectionEnd) caretposCorrection = { begin: begin, end: end };
                 } else {
                 } else {
-                    var caretpos = android ? caretposCorrection : null;
+                    var caretpos = android ? caretposCorrection : null, caretposCorrection = null;
                     if (caretpos == null) {
                     if (caretpos == null) {
                         if (npt.setSelectionRange) {
                         if (npt.setSelectionRange) {
                             begin = npt.selectionStart;
                             begin = npt.selectionStart;
@@ -466,7 +466,7 @@ This plugin is based on the masked input plugin written by Josh Bush (digitalbus
                             end = begin + range.text.length;
                             end = begin + range.text.length;
                         }
                         }
                         caretpos = { begin: begin, end: end };
                         caretpos = { begin: begin, end: end };
-                    } else caretposCorrection = null;
+                    } 
                     return caretpos;
                     return caretpos;
                 }
                 }
             };
             };