You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When registering a shortcut with goog.ui.KeyboardShortcutHandler for the escape key with a key name, one must use 'esc' instead of 'escape', since the goog.events.KeyNames does not have 'escape'. However, the real key name used by most modern browsers (exception being IE and Edge) for the escape key is "Escape" (per spec). So when a shortcut is registered and the escape key is pressed in a newer browser, the lookup for a registered key named "Escape" fails, and it instead falls back to using the keyCode.
This is a problem since keyCode is deprecated and some testing libraries expect to be able to create KeyboardEvent objects using the spec'ed name for this key: 'Escape'
The text was updated successfully, but these errors were encountered:
When registering a shortcut with goog.ui.KeyboardShortcutHandler for the escape key with a key name, one must use 'esc' instead of 'escape', since the goog.events.KeyNames does not have 'escape'. However, the real key name used by most modern browsers (exception being IE and Edge) for the escape key is "Escape" (per spec). So when a shortcut is registered and the escape key is pressed in a newer browser, the lookup for a registered key named "Escape" fails, and it instead falls back to using the keyCode.
This is a problem since keyCode is deprecated and some testing libraries expect to be able to create KeyboardEvent objects using the spec'ed name for this key: 'Escape'
The text was updated successfully, but these errors were encountered: