Browse Source

tweak: numericInput and tab-in functionality part 2

Robin Herbots 12 years ago
parent
commit
76e03ea378
1 changed files with 5 additions and 1 deletions
  1. 5 1
      js/jquery.inputmask.js

+ 5 - 1
js/jquery.inputmask.js

@@ -1647,7 +1647,11 @@
                                 valueOnFocus = getActiveBuffer().join('');
                             } else {
                                 writeBuffer(input, buffer);
-                                caret(input, TranslatePosition(0), TranslatePosition(getMaskLength()));
+                                if (buffer.join('') == getActiveBufferTemplate().join('') && $.inArray(opts.radixPoint, buffer) != -1) {
+                                    caret(input, TranslatePosition(0));
+                                    $input.click();
+                                } else
+                                    caret(input, TranslatePosition(0), TranslatePosition(getMaskLength()));
                             }
                         }
                     }