jsuites 4.12.10 → 4.12.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -17,7 +17,7 @@
17
17
 
18
18
  var jSuites = function(options) {
19
19
  var obj = {}
20
- var version = '4.12.10';
20
+ var version = '4.12.11';
21
21
 
22
22
  var find = function(DOMElement, component) {
23
23
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -8124,7 +8124,11 @@ jSuites.mask = (function() {
8124
8124
  parse.call(o);
8125
8125
  }
8126
8126
 
8127
- if (isNumeric(o.type)) {
8127
+ // New value
8128
+ var newValue = o.values.join('');
8129
+
8130
+ // Add tokens to the end of string only if string is not empty
8131
+ if (isNumeric(o.type) && newValue !== '') {
8128
8132
  // Complement things in the end of the mask
8129
8133
  while (typeof(o.tokens[o.index]) !== 'undefined') {
8130
8134
  var t = getMethod.call(o, o.tokens[o.index]);
@@ -8140,7 +8144,7 @@ jSuites.mask = (function() {
8140
8144
  }
8141
8145
 
8142
8146
  // New value
8143
- var newValue = o.values.join('');
8147
+ newValue = o.values.join('');
8144
8148
 
8145
8149
  // Reset value
8146
8150
  if (o.input) {
package/dist/jsuites.js CHANGED
@@ -17,7 +17,7 @@
17
17
 
18
18
  var jSuites = function(options) {
19
19
  var obj = {}
20
- var version = '4.12.10';
20
+ var version = '4.12.11';
21
21
 
22
22
  var find = function(DOMElement, component) {
23
23
  if (DOMElement[component.type] && DOMElement[component.type] == component) {
@@ -8549,7 +8549,11 @@ jSuites.mask = (function() {
8549
8549
  parse.call(o);
8550
8550
  }
8551
8551
 
8552
- if (isNumeric(o.type)) {
8552
+ // New value
8553
+ var newValue = o.values.join('');
8554
+
8555
+ // Add tokens to the end of string only if string is not empty
8556
+ if (isNumeric(o.type) && newValue !== '') {
8553
8557
  // Complement things in the end of the mask
8554
8558
  while (typeof(o.tokens[o.index]) !== 'undefined') {
8555
8559
  var t = getMethod.call(o, o.tokens[o.index]);
@@ -8565,7 +8569,7 @@ jSuites.mask = (function() {
8565
8569
  }
8566
8570
 
8567
8571
  // New value
8568
- var newValue = o.values.join('');
8572
+ newValue = o.values.join('');
8569
8573
 
8570
8574
  // Reset value
8571
8575
  if (o.input) {
package/package.json CHANGED
@@ -19,7 +19,7 @@
19
19
  "javascript plugins"
20
20
  ],
21
21
  "main": "dist/jsuites.js",
22
- "version": "4.12.10",
22
+ "version": "4.12.11",
23
23
  "bugs": "https://github.com/jsuites/jsuites/issues",
24
24
  "homepage": "https://github.com/jsuites/jsuites",
25
25
  "docs": "https://jsuites.net",