diff --git a/lib/documentListeners.js b/lib/documentListeners.js index c0972f4b6..dcc44972e 100644 --- a/lib/documentListeners.js +++ b/lib/documentListeners.js @@ -21,7 +21,10 @@ function inputIsNumberValue(input) { return (type === 'number' || (type === 'range' && !input.multiple)); } var inputValue = function(input) { - return inputIsNumberValue(input) ? input.valueAsNumber : input.value; + if (!inputIsNumberValue(input)) + return input.value; + else + return (isFinite(input.valueAsNumber)) ? input.valueAsNumber : ''; }; function addDocumentListeners(doc) {