Browse Source

fix caret positioning

Robin Herbots 9 years ago
parent
commit
45fa4b2da9
1 changed files with 1 additions and 1 deletions
  1. 1 1
      js/inputmask.js

+ 1 - 1
js/inputmask.js

@@ -2759,7 +2759,7 @@
 			});
 			$(input.nextSibling).on("click", function (e) {
 				input.focus();
-				caret(input, Math.floor(e.clientX / charSize()));
+				caret(input, Math.floor((e.clientX - parseInt(computedStyle.paddingLeft)) / charSize()));
 				$(input).trigger("click");
 			});
 		}