• Robert Knight's avatar
    Fix error if `matchShortcut` is called with non-KeyboardEvent · 54cae019
    Robert Knight authored
    Work around an exception when testing for shortcuts in `keydown` event handlers,
    if the handler is called with an argument that is not a `KeyboardEvent`, and is
    missing the expected `key` property. The workaround has been added to
    `matchShortcut` because it is easier to do there than remember for each
    `keydown` event handler, although there is a risk that other code in these
    handlers could get caught out by the same issue.
    
    I was able to reproduce this problem locally in Chrome 118 when using autofill
    to insert text into the search input field (see comments), though there might be
    other causes as well.
    
    This should fix https://hypothesis.sentry.io/issues/3987386810/?project=69811
    54cae019
Name
Last commit
Last update
..
integration Loading commit data...
cfi-test.js Loading commit data...
config-fragment-test.js Loading commit data...
download-json-file-test.js Loading commit data...
frame-error-capture-test.js Loading commit data...
has-own-test.js Loading commit data...
injector-test.js Loading commit data...
is-object-test.js Loading commit data...
keyboard-navigation-test.js Loading commit data...
listener-collection-test.js Loading commit data...
promise-with-resolvers-test.js Loading commit data...
prompts-test.js Loading commit data...
random-test.js Loading commit data...
read-json-file-test.js Loading commit data...
shortcut-test.js Loading commit data...
type-coercions-test.js Loading commit data...
user-agent-test.js Loading commit data...
warn-once-test.js Loading commit data...