|
|
@@ -3,7 +3,7 @@
|
|
|
* https://github.com/RobinHerbots/Inputmask
|
|
|
* Copyright (c) 2010 - 2017 Robin Herbots
|
|
|
* Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
|
|
|
-* Version: 4.0.1-21
|
|
|
+* Version: 4.0.1-22
|
|
|
*/
|
|
|
|
|
|
!function(factory) {
|
|
|
@@ -732,10 +732,11 @@
|
|
|
return input.focus(), caret(input, findCaretPos(e.clientX)), EventHandlers.clickEvent.call(input, [ e ]);
|
|
|
}
|
|
|
var computedStyle = (input.ownerDocument.defaultView || window).getComputedStyle(input, null), template = document.createElement("div");
|
|
|
- colorMask = document.createElement("div"), colorMask.className = "im-colormask",
|
|
|
- input.parentNode.insertBefore(colorMask, input), input.parentNode.removeChild(input),
|
|
|
- colorMask.appendChild(input), colorMask.appendChild(template), $(input).on("click", clickHandler),
|
|
|
- $(template).on("click", clickHandler), $(input).on("keydown", function(e) {
|
|
|
+ template.style.width = computedStyle.width, colorMask = document.createElement("div"),
|
|
|
+ colorMask.className = "im-colormask", input.parentNode.insertBefore(colorMask, input),
|
|
|
+ input.parentNode.removeChild(input), colorMask.appendChild(template), colorMask.appendChild(input),
|
|
|
+ input.style.left = template.offsetLeft + "px", $(input).on("click", clickHandler),
|
|
|
+ $(input).on("keydown", function(e) {
|
|
|
e.shiftKey || !1 === opts.insertMode || setTimeout(function() {
|
|
|
renderColorMask(input);
|
|
|
}, 0);
|
|
|
@@ -1067,7 +1068,7 @@
|
|
|
}
|
|
|
};
|
|
|
Inputmask.prototype.positionColorMask = function(input, template) {
|
|
|
- template.style.left = input.offsetLeft + "px";
|
|
|
+ input.style.left = template.offsetLeft + "px";
|
|
|
};
|
|
|
var valueBuffer;
|
|
|
if (actionObj !== undefined) switch (actionObj.action) {
|