Show More
@@ -335,8 +335,10 b' define([' | |||||
335 |
|
335 | |||
336 | // Try to parse value as a int. |
|
336 | // Try to parse value as a int. | |
337 | var numericalValue = 0; |
|
337 | var numericalValue = 0; | |
338 |
|
|
338 | var trimmed = e.target.value.trim(); | |
339 | var trimmed = e.target.value.trim(); |
|
339 | if (trimmed === '') { | |
|
340 | return; | |||
|
341 | } else { | |||
340 | if (!(['-', '-.', '.', '+.', '+'].indexOf(trimmed) >= 0)) { |
|
342 | if (!(['-', '-.', '.', '+.', '+'].indexOf(trimmed) >= 0)) { | |
341 | numericalValue = this._parse_value(e.target.value); |
|
343 | numericalValue = this._parse_value(e.target.value); | |
342 | } |
|
344 | } | |
@@ -366,7 +368,7 b' define([' | |||||
366 |
|
368 | |||
367 | handleChanged: function(e) { |
|
369 | handleChanged: function(e) { | |
368 | // Applies validated input. |
|
370 | // Applies validated input. | |
369 | if (this.model.get('value') != e.target.value) { |
|
371 | if (e.target.value.trim() === '' || e.target.value !== this.model.get('value')) { | |
370 | e.target.value = this.model.get('value'); |
|
372 | e.target.value = this.model.get('value'); | |
371 | } |
|
373 | } | |
372 | }, |
|
374 | }, |
General Comments 0
You need to be logged in to leave comments.
Login now