Skip to content

Commit f1a0c0a

Browse files
authored
Updates key.js deal with auto-filling from Chrome
This deals with the auto-filling from chrome which registers as an undefined key because of the amount of characters that this enters. If you don't have this in this error occurs on text-boxes that are auto-filled https://www.screencast.com/t/8BdlCBMgY
1 parent b6f9d73 commit f1a0c0a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/event/Key.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ var Key = new function() {
8181
// Use short version for arrow keys: ArrowLeft -> Left
8282
: /^Arrow[A-Z]/.test(key) ? key.substr(5)
8383
// This is far from ideal, but what else can we do?
84-
: key === 'Unidentified' ? String.fromCharCode(event.keyCode)
84+
: key === 'Unidentified' || key === undefined ? String.fromCharCode(event.keyCode)
8585
: key;
8686
return keyLookup[key] ||
8787
// Hyphenate camel-cased special keys, lower-case normal ones:

0 commit comments

Comments
 (0)