Browse Source

testmobile

Robin Herbots 11 years ago
parent
commit
6aa0a535a3
1 changed files with 5 additions and 3 deletions
  1. 5 3
      js/jquery.inputmask.js

+ 5 - 3
js/jquery.inputmask.js

@@ -1184,10 +1184,15 @@
 
             function mobileInputEvent(e) {
                 var input = this, $input = $(input);
+				input.focus();
 
                 //backspace in chrome32 only fires input event - detect & treat
                 var caretPos = caret(input),
                     currentValue = input._valueGet();
+                    
+                console.log(currentValue);
+                currentValue = currentValue.replace(new RegExp("(" + escapeRegex(getActiveBufferTemplate().join('')) + ")*"), "");
+                console.log(currentValue);    
                 //correct caretposition for chrome
                 if (caretPos.begin > currentValue.length) {
                     caret(input, currentValue.length);
@@ -1199,9 +1204,6 @@
                     e.keyCode = opts.keyCode.BACKSPACE;
                     keydownEvent.call(input, e);
                 } else { //nonnumerics don't fire keypress 
-                    console.log(currentValue);
-                    currentValue = currentValue.replace(new RegExp("(" + escapeRegex(getActiveBufferTemplate().join('')) + ")*"), "");
-                    console.log(currentValue);
                     checkVal(input, false, false, currentValue.split(''));
                     writeBuffer(input, getActiveBuffer());
                     if (isComplete(getActiveBuffer()) === true)