##// END OF EJS Templates
Merge pull request #5444 from jdfreder/numparse...
Min RK -
r16125:0ee2a449 merge
parent child Browse files
Show More
@@ -214,8 +214,11 b' define(["widgets/js/widget"], function(WidgetManager){'
214 // Try to parse value as a int.
214 // Try to parse value as a int.
215 var numericalValue = 0;
215 var numericalValue = 0;
216 if (e.target.value !== '') {
216 if (e.target.value !== '') {
217 var trimmed = e.target.value.trim();
218 if (!(['-', '-.', '.', '+.', '+'].indexOf(trimmed) >= 0)) {
217 numericalValue = this._parse_value(e.target.value);
219 numericalValue = this._parse_value(e.target.value);
218 }
220 }
221 }
219
222
220 // If parse failed, reset value to value stored in model.
223 // If parse failed, reset value to value stored in model.
221 if (isNaN(numericalValue)) {
224 if (isNaN(numericalValue)) {
General Comments 0
You need to be logged in to leave comments. Login now