浏览代码

update change check in checkval

Robin Herbots 4 年之前
父节点
当前提交
c7628af56d
共有 10 个文件被更改,包括 14 次插入14 次删除
  1. 1 1
      bower.json
  2. 1 1
      composer.json
  3. 2 2
      dist/inputmask.js
  4. 2 2
      dist/inputmask.min.js
  5. 2 2
      dist/jquery.inputmask.js
  6. 2 2
      dist/jquery.inputmask.min.js
  7. 1 1
      lib/definitions.js
  8. 1 1
      lib/eventhandlers.js
  9. 1 1
      lib/inputHandling.js
  10. 1 1
      package.json

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
   "name": "inputmask",
-  "version": "5.0.7-beta.23",
+  "version": "5.0.7-beta.24",
   "main": [
 	  "./index.js",
     "./css/inputmask.css"

+ 1 - 1
composer.json

@@ -1,7 +1,7 @@
 {
   "name": "robinherbots/inputmask",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
-  "version": "5.0.7-beta.23",
+  "version": "5.0.7-beta.24",
   "type": "library",
   "keywords": ["jquery", "plugins", "input", "form", "inputmask", "mask"],
   "homepage": "http://robinherbots.github.io/Inputmask",

+ 2 - 2
dist/inputmask.js

@@ -3,7 +3,7 @@
  * https://github.com/RobinHerbots/Inputmask
  * Copyright (c) 2010 - 2021 Robin Herbots
  * Licensed under the MIT license
- * Version: 5.0.7-beta.23
+ * Version: 5.0.7-beta.24
  */
 !function(e, t) {
     if ("object" == typeof exports && "object" == typeof module) module.exports = t(); else if ("function" == typeof define && define.amd) define([], t); else {
@@ -1561,7 +1561,7 @@
                             _++;
                         }
                     }
-                    t && p.call(l, e, o.getBuffer.call(l), g ? g.forwardPosition : l.caretPos.begin, n || new d.Event("checkval"), n && ("input" === n.type || "paste" === n.type) && l.undoValue !== l._valueGet(!0)), 
+                    t && p.call(l, e, o.getBuffer.call(l), g ? g.forwardPosition : l.caretPos.begin, n || new d.Event("checkval"), n && ("input" === n.type || "paste" === n.type) && l.undoValue !== o.getBuffer.call(l).join("")), 
                     f.skipOptionalPartCharacter = k;
                 }
                 function p(e, t, i, a, r) {

文件差异内容过多而无法显示
+ 2 - 2
dist/inputmask.min.js


+ 2 - 2
dist/jquery.inputmask.js

@@ -3,7 +3,7 @@
  * https://github.com/RobinHerbots/Inputmask
  * Copyright (c) 2010 - 2021 Robin Herbots
  * Licensed under the MIT license
- * Version: 5.0.7-beta.23
+ * Version: 5.0.7-beta.24
  */
 !function(e, t) {
     if ("object" == typeof exports && "object" == typeof module) module.exports = t(require("jquery")); else if ("function" == typeof define && define.amd) define([ "jquery" ], t); else {
@@ -1435,7 +1435,7 @@
                             S++;
                         }
                     }
-                    t && p.call(l, e, o.getBuffer.call(l), g ? g.forwardPosition : l.caretPos.begin, n || new d.Event("checkval"), n && ("input" === n.type || "paste" === n.type) && l.undoValue !== l._valueGet(!0)), 
+                    t && p.call(l, e, o.getBuffer.call(l), g ? g.forwardPosition : l.caretPos.begin, n || new d.Event("checkval"), n && ("input" === n.type || "paste" === n.type) && l.undoValue !== o.getBuffer.call(l).join("")), 
                     f.skipOptionalPartCharacter = k;
                 }
                 function p(e, t, i, a, r) {

文件差异内容过多而无法显示
+ 2 - 2
dist/jquery.inputmask.min.js


+ 1 - 1
lib/definitions.js

@@ -10,4 +10,4 @@ export default {
 	"*": {
 		validator: "[0-9\uFF10-\uFF19A-Za-z\u0410-\u044F\u0401\u0451\u00C0-\u00FF\u00B5]"
 	}
-}
+};

+ 1 - 1
lib/eventhandlers.js

@@ -202,7 +202,7 @@ var EventHandlers = {
 			}
 		}
 		checkVal(input, true, false, pasteValue.toString().split(""), e);
-		e.preventDefault();
+		e.preventDefault()
 	},
 	inputFallBackEvent: function (e) { //fallback when keypress is not triggered
 		const inputmask = this.inputmask, opts = inputmask.opts, $ = inputmask.dependencyLib;

+ 1 - 1
lib/inputHandling.js

@@ -146,7 +146,7 @@ function checkVal(input, writeOut, strict, nptvl, initiatingEvent) {
 		}
 	}
 	if (writeOut) {
-		writeBuffer.call(inputmask, input, getBuffer.call(inputmask), result ? result.forwardPosition : inputmask.caretPos.begin, initiatingEvent || new $.Event("checkval"), initiatingEvent && (initiatingEvent.type === "input" || initiatingEvent.type === "paste") && inputmask.undoValue !== inputmask._valueGet(true));
+		writeBuffer.call(inputmask, input, getBuffer.call(inputmask), result ? result.forwardPosition : inputmask.caretPos.begin, initiatingEvent || new $.Event("checkval"), initiatingEvent && (initiatingEvent.type === "input" || initiatingEvent.type === "paste") && inputmask.undoValue !== getBuffer.call(inputmask).join(""));
 		// for (var vndx in maskset.validPositions) {
 		// 	if (maskset.validPositions[vndx].match.generated !== true) { //only remove non forced generated
 		// 		delete maskset.validPositions[vndx].generatedInput; //clear generated markings ~ consider initializing with a  value as fully typed

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
   "name": "inputmask",
-  "version": "5.0.7-beta.23",
+  "version": "5.0.7-beta.24",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
   "main": "dist/inputmask.js",
   "files": [