浏览代码

problem with two separate alternaions #1722

Robin Herbots 8 年之前
父节点
当前提交
fe8eecd48f
共有 48 个文件被更改,包括 125 次插入119 次删除
  1. 2 0
      CHANGELOG.md
  2. 1 1
      bower.json
  3. 1 1
      component.json
  4. 1 1
      composer.json
  5. 1 1
      dist/inputmask/bindings/inputmask.binding.js
  6. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js
  7. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js
  8. 1 1
      dist/inputmask/dependencyLibs/inputmask.dependencyLib.js
  9. 1 1
      dist/inputmask/global/document.js
  10. 1 1
      dist/inputmask/global/window.js
  11. 2 2
      dist/inputmask/inputmask.date.extensions.js
  12. 1 1
      dist/inputmask/inputmask.extensions.js
  13. 16 21
      dist/inputmask/inputmask.js
  14. 1 1
      dist/inputmask/inputmask.numeric.extensions.js
  15. 1 1
      dist/inputmask/inputmask.phone.extensions.js
  16. 1 1
      dist/inputmask/jquery.inputmask.js
  17. 1 1
      dist/inputmask/phone-codes/phone-be.js
  18. 1 1
      dist/inputmask/phone-codes/phone-ca.js
  19. 1 1
      dist/inputmask/phone-codes/phone-nl.js
  20. 1 1
      dist/inputmask/phone-codes/phone-ru.js
  21. 1 1
      dist/inputmask/phone-codes/phone-uk.js
  22. 1 1
      dist/inputmask/phone-codes/phone-us.js
  23. 1 1
      dist/inputmask/phone-codes/phone.js
  24. 18 23
      dist/jquery.inputmask.bundle.js
  25. 1 1
      dist/min/inputmask/bindings/inputmask.binding.min.js
  26. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.min.js
  27. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.min.js
  28. 1 1
      dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.min.js
  29. 1 1
      dist/min/inputmask/global/document.min.js
  30. 1 1
      dist/min/inputmask/global/window.min.js
  31. 2 2
      dist/min/inputmask/inputmask.date.extensions.min.js
  32. 1 1
      dist/min/inputmask/inputmask.extensions.min.js
  33. 2 2
      dist/min/inputmask/inputmask.min.js
  34. 1 1
      dist/min/inputmask/inputmask.numeric.extensions.min.js
  35. 1 1
      dist/min/inputmask/inputmask.phone.extensions.min.js
  36. 1 1
      dist/min/inputmask/jquery.inputmask.min.js
  37. 1 1
      dist/min/inputmask/phone-codes/phone-be.min.js
  38. 1 1
      dist/min/inputmask/phone-codes/phone-ca.min.js
  39. 1 1
      dist/min/inputmask/phone-codes/phone-nl.min.js
  40. 1 1
      dist/min/inputmask/phone-codes/phone-ru.min.js
  41. 1 1
      dist/min/inputmask/phone-codes/phone-uk.min.js
  42. 1 1
      dist/min/inputmask/phone-codes/phone-us.min.js
  43. 1 1
      dist/min/inputmask/phone-codes/phone.min.js
  44. 2 2
      dist/min/jquery.inputmask.bundle.min.js
  45. 1 1
      js/inputmask.date.extensions.js
  46. 31 28
      js/inputmask.js
  47. 1 1
      package.json
  48. 11 0
      qunit/tests_alternations.js

+ 2 - 0
CHANGELOG.md

@@ -6,12 +6,14 @@ All notable changes to this project will be documented in this file.
 - new datetime alias (WIP)
 - new datetime alias (WIP)
 
 
 ### Updates
 ### Updates
+- fix in determineTestTemplate.  Impacts alternations.
 - rename androidHack option to disablePredictiveText. Make it available for other platforms.
 - rename androidHack option to disablePredictiveText. Make it available for other platforms.
 - drop Regex alias
 - drop Regex alias
 - drop all date/time related aliases
 - drop all date/time related aliases
 - enhance inputfallback (Android)
 - enhance inputfallback (Android)
 
 
 ### Fixed
 ### Fixed
+- problem with two separate alternaions #1722
 - colorMask + Remask = Duplicate im-colormask element #1709
 - colorMask + Remask = Duplicate im-colormask element #1709
 
 
 ## [3.3.9 - 2017-10-10]
 ## [3.3.9 - 2017-10-10]

+ 1 - 1
bower.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "inputmask",
   "name": "inputmask",
-  "version": "4.0.0-52",
+  "version": "4.0.0-53",
   "main": [
   "main": [
 	  "./dist/inputmask/inputmask.js",
 	  "./dist/inputmask/inputmask.js",
 	  "./dist/inputmask/inputmask.extensions.js",
 	  "./dist/inputmask/inputmask.extensions.js",

+ 1 - 1
component.json

@@ -2,7 +2,7 @@
 	"name": "inputmask",
 	"name": "inputmask",
 	"repository": "robinherbots/Inputmask",
 	"repository": "robinherbots/Inputmask",
 	"description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
 	"description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
-	"version": "4.0.0-52",
+	"version": "4.0.0-53",
 	"keywords": [
 	"keywords": [
 		"jquery",
 		"jquery",
 		"plugins",
 		"plugins",

+ 1 - 1
composer.json

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

+ 1 - 1
dist/inputmask/bindings/inputmask.binding.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/dependencyLibs/inputmask.dependencyLib.jqlite.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/dependencyLibs/inputmask.dependencyLib.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/global/document.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 "function" == typeof define && define.amd ? define(function() {
 "function" == typeof define && define.amd ? define(function() {

+ 1 - 1
dist/inputmask/global/window.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 "function" == typeof define && define.amd ? define(function() {
 "function" == typeof define && define.amd ? define(function() {

+ 2 - 2
dist/inputmask/inputmask.date.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {
@@ -96,7 +96,7 @@
                 opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat, 
                 opts.outputFormat = formatAlias[opts.outputFormat] || opts.outputFormat || opts.inputFormat, 
                 opts.placeholder = opts.placeholder !== Inputmask.prototype.defaults.placeholder ? opts.placeholder : opts.inputFormat, 
                 opts.placeholder = opts.placeholder !== Inputmask.prototype.defaults.placeholder ? opts.placeholder : opts.inputFormat, 
                 opts.min = analyseMask(opts.min, opts.inputFormat, opts), opts.max = analyseMask(opts.max, opts.inputFormat, opts), 
                 opts.min = analyseMask(opts.min, opts.inputFormat, opts), opts.max = analyseMask(opts.max, opts.inputFormat, opts), 
-                opts.regex = parse(opts.inputFormat, opts), console.log(opts.regex), null;
+                opts.regex = parse(opts.inputFormat, opts), null;
             },
             },
             inputFormat: "dd/mm/yyyy HH:MM",
             inputFormat: "dd/mm/yyyy HH:MM",
             displayFormat: void 0,
             displayFormat: void 0,

+ 1 - 1
dist/inputmask/inputmask.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

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


+ 1 - 1
dist/inputmask/inputmask.numeric.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/inputmask.phone.extensions.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/jquery.inputmask.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-be.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-ca.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-nl.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-ru.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-uk.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone-us.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

+ 1 - 1
dist/inputmask/phone-codes/phone.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(factory) {
 !function(factory) {

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


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


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


+ 1 - 1
dist/min/inputmask/dependencyLibs/inputmask.dependencyLib.jquery.min.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):window.dependencyLib=e(jQuery)}(function(e){return e});
 !function(e){"function"==typeof define&&define.amd?define(["jquery"],e):"object"==typeof exports?module.exports=e(require("jquery")):window.dependencyLib=e(jQuery)}(function(e){return e});

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


+ 1 - 1
dist/min/inputmask/global/document.min.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 "function"==typeof define&&define.amd?define(function(){return document}):"object"==typeof exports&&(module.exports=document);
 "function"==typeof define&&define.amd?define(function(){return document}):"object"==typeof exports&&(module.exports=document);

+ 1 - 1
dist/min/inputmask/global/window.min.js

@@ -3,7 +3,7 @@
 * https://github.com/RobinHerbots/Inputmask
 * https://github.com/RobinHerbots/Inputmask
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Copyright (c) 2010 - 2017 Robin Herbots
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
 * Licensed under the MIT license (http://www.opensource.org/licenses/mit-license.php)
-* Version: 4.0.0-52
+* Version: 4.0.0-53
 */
 */
 
 
 "function"==typeof define&&define.amd?define(function(){return window}):"object"==typeof exports&&(module.exports=window);
 "function"==typeof define&&define.amd?define(function(){return window}):"object"==typeof exports&&(module.exports=window);

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


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


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


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


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


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


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


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


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


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


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


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


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


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


+ 1 - 1
js/inputmask.date.extensions.js

@@ -170,7 +170,7 @@
                 opts.min = analyseMask(opts.min, opts.inputFormat, opts);
                 opts.min = analyseMask(opts.min, opts.inputFormat, opts);
                 opts.max = analyseMask(opts.max, opts.inputFormat, opts);
                 opts.max = analyseMask(opts.max, opts.inputFormat, opts);
                 opts.regex = parse(opts.inputFormat, opts);
                 opts.regex = parse(opts.inputFormat, opts);
-                console.log(opts.regex);
+                // console.log(opts.regex);
                 return null; //migrate to regex mask
                 return null; //migrate to regex mask
             },
             },
             inputFormat: "dd/mm/yyyy HH:MM", //format used to input the date
             inputFormat: "dd/mm/yyyy HH:MM", //format used to input the date

+ 31 - 28
js/inputmask.js

@@ -946,19 +946,18 @@
             resetMaskSet(true);
             resetMaskSet(true);
         }
         }
 
 
-        function determineTestTemplate(tests, guessNextBest) {
+        function determineTestTemplate(pos, tests, guessNextBest) {
+            pos = pos > 0 ? pos - 1 : 0;
             var testPos,
             var testPos,
-                testPositions = tests,
-                lvp = getLastValidPosition(),
-                lvTest = getMaskSet().validPositions[lvp] || getTests(0)[0],
-                lvTestAltArr = (lvTest.alternation !== undefined) ? lvTest.locator[lvTest.alternation].toString().split(",") : [];
-            for (var ndx = 0; ndx < testPositions.length; ndx++) {
-                testPos = testPositions[ndx];
+                altTest = getTest(pos),
+                altArr = (altTest.alternation !== undefined) ? altTest.locator[altTest.alternation].toString().split(",") : [];
+            for (var ndx = 0; ndx < tests.length; ndx++) {
+                testPos = tests[ndx];
 
 
                 if (testPos.match &&
                 if (testPos.match &&
                     (((opts.greedy && testPos.match.optionalQuantifier !== true) || (testPos.match.optionality === false || testPos.match.newBlockMarker === false) && testPos.match.optionalQuantifier !== true) &&
                     (((opts.greedy && testPos.match.optionalQuantifier !== true) || (testPos.match.optionality === false || testPos.match.newBlockMarker === false) && testPos.match.optionalQuantifier !== true) &&
-                        ((lvTest.alternation === undefined || lvTest.alternation !== testPos.alternation) ||
-                            (testPos.locator[lvTest.alternation] !== undefined && checkAlternationMatch(testPos.locator[lvTest.alternation].toString().split(","), lvTestAltArr))))) {
+                        ((altTest.alternation === undefined || altTest.alternation !== testPos.alternation) ||
+                            (testPos.locator[altTest.alternation] !== undefined && checkAlternationMatch(testPos.locator[altTest.alternation].toString().split(","), altArr))))) {
 
 
                     if (guessNextBest !== true || (testPos.match.fn === null && !/[0-9a-bA-Z]/.test(testPos.match.def))) {
                     if (guessNextBest !== true || (testPos.match.fn === null && !/[0-9a-bA-Z]/.test(testPos.match.def))) {
                         break;
                         break;
@@ -970,7 +969,7 @@
         }
         }
 
 
         function getTestTemplate(pos, ndxIntlzr, tstPs) {
         function getTestTemplate(pos, ndxIntlzr, tstPs) {
-            return getMaskSet().validPositions[pos] || determineTestTemplate(getTests(pos, ndxIntlzr ? ndxIntlzr.slice() : ndxIntlzr, tstPs));
+            return getMaskSet().validPositions[pos] || determineTestTemplate(pos, getTests(pos, ndxIntlzr ? ndxIntlzr.slice() : ndxIntlzr, tstPs));
         }
         }
 
 
         function getTest(pos) {
         function getTest(pos) {
@@ -1105,6 +1104,7 @@
                                         altIndexArr.push(amndx);
                                         altIndexArr.push(amndx);
                                     }
                                     }
                                 }
                                 }
+
                                 for (var ndx = 0; ndx < altIndexArr.length; ndx++) {
                                 for (var ndx = 0; ndx < altIndexArr.length; ndx++) {
                                     amndx = parseInt(altIndexArr[ndx]);
                                     amndx = parseInt(altIndexArr[ndx]);
                                     matches = [];
                                     matches = [];
@@ -1112,16 +1112,19 @@
                                     ndxInitializer = resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice();
                                     ndxInitializer = resolveNdxInitializer(testPos, amndx, loopNdxCnt) || ndxInitializerClone.slice();
                                     match = handleMatch(alternateToken.matches[amndx] || maskToken.matches[amndx], [amndx].concat(loopNdx), quantifierRecurse) || match;
                                     match = handleMatch(alternateToken.matches[amndx] || maskToken.matches[amndx], [amndx].concat(loopNdx), quantifierRecurse) || match;
                                     if (match !== true && match !== undefined && (altIndexArr[altIndexArr.length - 1] < alternateToken.matches.length)) { //no match in the alternations (length mismatch) => look further
                                     if (match !== true && match !== undefined && (altIndexArr[altIndexArr.length - 1] < alternateToken.matches.length)) { //no match in the alternations (length mismatch) => look further
-                                        var ntndx = $.inArray(match, maskToken.matches) + 1;
-                                        if (maskToken.matches.length > ntndx) {
-                                            match = handleMatch(maskToken.matches[ntndx], [ntndx].concat(loopNdx.slice(1, loopNdx.length)), quantifierRecurse);
-                                            if (match) {
-                                                altIndexArr.push(ntndx.toString());
-                                                $.each(matches, function (ndx, lmnt) {
-                                                    lmnt.alternation = loopNdx.length - 1;
-                                                });
-                                            }
-                                        }
+                                        // ndx = altIndexArr.length;  //skip alternation
+
+                                        //TODO CHECK ME  IS THIS CORRECT???
+                                        // var ntndx = $.inArray(match, maskToken.matches) + 1;
+                                        // if (maskToken.matches.length > ntndx) {
+                                        //     match = handleMatch(maskToken.matches[ntndx], [ntndx].concat(loopNdx.slice(1, loopNdx.length)), quantifierRecurse);
+                                        //     if (match) {
+                                        //         altIndexArr.push(ntndx.toString());
+                                        //         $.each(matches, function (ndx, lmnt) {
+                                        //             lmnt.alternation = loopNdx.length - 1;
+                                        //         });
+                                        //     }
+                                        // }
                                     }
                                     }
                                     maltMatches = matches.slice();
                                     maltMatches = matches.slice();
                                     testPos = currentPos;
                                     testPos = currentPos;
@@ -1256,12 +1259,12 @@
                 }
                 }
             }
             }
 
 
-            function mergeLocators(tests) {
+            function mergeLocators(pos, tests) {
                 var locator = [];
                 var locator = [];
                 if (!$.isArray(tests)) tests = [tests];
                 if (!$.isArray(tests)) tests = [tests];
                 if (tests.length > 0) {
                 if (tests.length > 0) {
                     if (tests[0].alternation === undefined) {
                     if (tests[0].alternation === undefined) {
-                        locator = determineTestTemplate(tests.slice()).locator.slice();
+                        locator = determineTestTemplate(pos, tests.slice()).locator.slice();
                         if (locator.length === 0) locator = tests[0].locator.slice();
                         if (locator.length === 0) locator = tests[0].locator.slice();
                     } else {
                     } else {
                         $.each(tests, function (ndx, tst) {
                         $.each(tests, function (ndx, tst) {
@@ -1288,11 +1291,11 @@
                             tests[0].match.optionalQuantifier !== true &&
                             tests[0].match.optionalQuantifier !== true &&
                             tests[0].match.fn === null && !/[0-9a-bA-Z]/.test(tests[0].match.def)) {
                             tests[0].match.fn === null && !/[0-9a-bA-Z]/.test(tests[0].match.def)) {
                             if (getMaskSet().validPositions[pos - 1] === undefined) {
                             if (getMaskSet().validPositions[pos - 1] === undefined) {
-                                return [determineTestTemplate(tests)];
+                                return [determineTestTemplate(pos, tests)];
                             } else if (getMaskSet().validPositions[pos - 1].alternation === tests[0].alternation) {
                             } else if (getMaskSet().validPositions[pos - 1].alternation === tests[0].alternation) {
-                                return [determineTestTemplate(tests)];
+                                return [determineTestTemplate(pos, tests)];
                             } else if (getMaskSet().validPositions[pos - 1]) {
                             } else if (getMaskSet().validPositions[pos - 1]) {
-                                return [determineTestTemplate(tests)];
+                                return [determineTestTemplate(pos, tests)];
                             }
                             }
                         }
                         }
                     }
                     }
@@ -1309,7 +1312,7 @@
                         previousPos--;
                         previousPos--;
                     }
                     }
                     if (test !== undefined && previousPos > -1) {
                     if (test !== undefined && previousPos > -1) {
-                        ndxInitializer = mergeLocators(test);
+                        ndxInitializer = mergeLocators(previousPos, test);
                         cacheDependency = ndxInitializer.join("");
                         cacheDependency = ndxInitializer.join("");
                         testPos = previousPos;
                         testPos = previousPos;
                     }
                     }
@@ -1651,7 +1654,7 @@
                     for (var ps = originalPos; ps < newPos; ps++) {
                     for (var ps = originalPos; ps < newPos; ps++) {
                         if (getMaskSet().validPositions[ps] === undefined && !isMask(ps, true)) {
                         if (getMaskSet().validPositions[ps] === undefined && !isMask(ps, true)) {
                             var tests = getTests(ps).slice(),
                             var tests = getTests(ps).slice(),
-                                bestMatch = determineTestTemplate(tests, true),
+                                bestMatch = determineTestTemplate(ps, tests, true),
                                 equality = -1;
                                 equality = -1;
                             if (tests[tests.length - 1].match.def === "") tests.pop();
                             if (tests[tests.length - 1].match.def === "") tests.pop();
                             $.each(tests, function (ndx, tst) { //find best matching
                             $.each(tests, function (ndx, tst) { //find best matching
@@ -1758,7 +1761,7 @@
                     if (getMaskSet().validPositions[pndx] === undefined && (opts.jitMasking === false || opts.jitMasking > pndx)) {
                     if (getMaskSet().validPositions[pndx] === undefined && (opts.jitMasking === false || opts.jitMasking > pndx)) {
                         testsFromPos = getTests(pndx, getTestTemplate(pndx - 1).locator, pndx - 1).slice();
                         testsFromPos = getTests(pndx, getTestTemplate(pndx - 1).locator, pndx - 1).slice();
                         if (testsFromPos[testsFromPos.length - 1].match.def === "") testsFromPos.pop();
                         if (testsFromPos[testsFromPos.length - 1].match.def === "") testsFromPos.pop();
-                        testTemplate = determineTestTemplate(testsFromPos);
+                        testTemplate = determineTestTemplate(pndx, testsFromPos);
                         if (testTemplate && (testTemplate.match.def === opts.radixPointDefinitionSymbol || !isMask(pndx, true) ||
                         if (testTemplate && (testTemplate.match.def === opts.radixPointDefinitionSymbol || !isMask(pndx, true) ||
                                 ($.inArray(opts.radixPoint, getBuffer()) < pndx && testTemplate.match.fn && testTemplate.match.fn.test(getPlaceholder(pndx), getMaskSet(), pndx, false, opts)))) {
                                 ($.inArray(opts.radixPoint, getBuffer()) < pndx && testTemplate.match.fn && testTemplate.match.fn.test(getPlaceholder(pndx), getMaskSet(), pndx, false, opts)))) {
                             result = _isValid(pndx, getPlaceholder(pndx, testTemplate.match, true) || (testTemplate.match.fn == null ? testTemplate.match.def : (getPlaceholder(pndx) !== "" ? getPlaceholder(pndx) : getBuffer()[pndx])), true);
                             result = _isValid(pndx, getPlaceholder(pndx, testTemplate.match, true) || (testTemplate.match.fn == null ? testTemplate.match.def : (getPlaceholder(pndx) !== "" ? getPlaceholder(pndx) : getBuffer()[pndx])), true);

+ 1 - 1
package.json

@@ -1,6 +1,6 @@
 {
 {
   "name": "inputmask",
   "name": "inputmask",
-  "version": "4.0.0-52",
+  "version": "4.0.0-53",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
   "description": "Inputmask is a javascript library which creates an input mask.  Inputmask can run against vanilla javascript, jQuery and jqlite.",
   "main": "index.js",
   "main": "index.js",
   "files": [
   "files": [

+ 11 - 0
qunit/tests_alternations.js

@@ -302,4 +302,15 @@ export default function (qunit, $, Inputmask) {
 		$("#testmask").Type("24");
 		$("#testmask").Type("24");
 		assert.equal(testmask.inputmask._valueGet(), "2_", "Result " + testmask.inputmask._valueGet());
 		assert.equal(testmask.inputmask._valueGet(), "2_", "Result " + testmask.inputmask._valueGet());
 	});
 	});
+
+    qunit.test("(1|2|3)/(4|5)", function (assert) {
+        var $fixture = $("#qunit-fixture");
+        $fixture.append('<input type="text" id="testmask" />');
+        var testmask = document.getElementById("testmask");
+
+        Inputmask("(1|2|3)/(4|5)").mask(testmask);
+        testmask.focus();
+        $("#testmask").Type("34");
+        assert.equal(testmask.inputmask._valueGet(), "3/4", "Result " + testmask.inputmask._valueGet());
+    });
 };
 };