• 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
..
components Loading commit data...
messaging Loading commit data...
test Loading commit data...
cfi.ts Loading commit data...
config-fragment.ts Loading commit data...
download-json-file.ts Loading commit data...
frame-error-capture.ts Loading commit data...
has-own.ts Loading commit data...
injector.ts Loading commit data...
is-object.ts Loading commit data...
keyboard-navigation.ts Loading commit data...
listener-collection.ts Loading commit data...
presentational-component.tsx Loading commit data...
promise-with-resolvers.ts Loading commit data...
prompts.tsx Loading commit data...
random.ts Loading commit data...
read-json-file.ts Loading commit data...
shortcut.ts Loading commit data...
type-coercions.ts Loading commit data...
user-agent.ts Loading commit data...
warn-once.ts Loading commit data...