check more keycodes so that label-placeholders don't disappear

This commit is contained in:
Kevin Ross 2015-12-14 08:59:22 -06:00
parent ee8d7bfae2
commit 68f5e99375

View File

@ -61,7 +61,18 @@ const Util = (($) => {
if (typeof event.which === 'undefined') {
return true
} else if (typeof event.which === 'number' && event.which > 0) {
return !event.ctrlKey && !event.metaKey && !event.altKey && event.which !== 8 && event.which !== 9
return (
!evt.ctrlKey
&& !evt.metaKey
&& !evt.altKey
&& evt.which != 8 // backspace
&& evt.which != 9 // tab
&& evt.which != 13 // enter
&& evt.which != 16 // shift
&& evt.which != 17 // ctrl
&& evt.which != 20 // caps lock
&& evt.which != 27 // escape
)
}
return false
},