Skip to content
This repository was archived by the owner on Dec 11, 2017. It is now read-only.
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions src/jquery.maskedinput.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
/*
Masked Input plugin for jQuery
Copyright (c) 2007-@Year Josh Bush (digitalbush.com)
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
Version: @version
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD. Register as an anonymous module.
define(['jquery'], factory);
} else {
// Browser globals
factory(jQuery);
}
}
(function($) {
var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask";
var iPhone = (window.orientation != undefined);
Expand Down Expand Up @@ -130,7 +139,7 @@
var pos = input.caret(),
begin = pos.begin,
end = pos.end;

if(end-begin==0){
begin=k!=46?seekPrev(begin):(end=seekNext(begin-1));
end=k==46?seekNext(end):end;
Expand Down Expand Up @@ -255,4 +264,4 @@
});
}
});
})(jQuery);
}));