Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Mask: more fixes for focus positioning / fixing unit tests

  • Loading branch information...
commit 00701c746a4deac060fcf44209f09add8d6dd48c 1 parent d377234
@gnarf gnarf authored
Showing with 2 additions and 2 deletions.
  1. +1 −1  tests/unit/mask/mask_events.js
  2. +1 −1  ui/jquery.ui.mask.js
View
2  tests/unit/mask/mask_events.js
@@ -180,7 +180,7 @@ test( "keypress: Typing with multi-byte fields", function() {
deepEqual( mask._caret(), { begin: 1, end: 1 }, "Caret position correct");
type( input, "z" );
equal( input.val(), "0z-__-__", "typed a z" );
- deepEqual( mask._caret(), { begin: 3, end: 3 }, "Caret position correct");
+ deepEqual( mask._caret(), { begin: 3, end: 5 }, "Caret position correct");
});
test( "keydown: Delete pulling values", function() {
View
2  ui/jquery.ui.mask.js
@@ -340,7 +340,7 @@ $.widget( "ui.mask", {
bufferObject,
character,
valuePosition = 0,
- lastFilledPosition = 0,
+ lastFilledPosition = -1,
value = this.element.val(),
bufferLength = this.buffer.length;
Please sign in to comment.
Something went wrong with that request. Please try again.