Skip to content

Commit 501d0d9

Browse files
committed
don't call bound function, or check for number, on blur if there is only whitespace
1 parent 31ad01b commit 501d0d9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/glow/primitives.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2927,6 +2927,9 @@
29272927
})
29282928
.blur(function(k) {
29292929
attrs.text = attrs.jwinput.val()
2930+
if (attrs.text.trim().length === 0) {
2931+
return // bail if the text field has only whitespace
2932+
}
29302933
var ok = wparse()
29312934
if (!ok) {
29322935
alert('Numeric input error')

0 commit comments

Comments
 (0)