Commit 3f15fdb 1 parent bae117c commit 3f15fdb Copy full SHA for 3f15fdb
File tree 2 files changed +7
-2
lines changed
packages/docsearch-react/src
2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,11 @@ dist/
15
15
16
16
# IDE
17
17
.vscode /
18
+ .idea
18
19
19
20
# Environment files
20
21
.env
21
22
22
23
# Cypress Video and Screenshots output
23
24
cypress /screenshots /
24
- cypress /videos /
25
+ cypress /videos /
Original file line number Diff line number Diff line change @@ -39,7 +39,11 @@ export function useDocSearchKeyboardEvents({
39
39
if (
40
40
( event . keyCode === 27 && isOpen ) ||
41
41
// The `Cmd+K` shortcut both opens and closes the modal.
42
- ( event . key . toLowerCase ( ) === 'k' && ( event . metaKey || event . ctrlKey ) ) ||
42
+ // We need to check for `event.key` because it can be `undefined` with
43
+ // Chrome's autofill feature.
44
+ // See https://github.com/paperjs/paper.js/issues/1398
45
+ ( event . key ?. toLowerCase ( ) === 'k' &&
46
+ ( event . metaKey || event . ctrlKey ) ) ||
43
47
// The `/` shortcut opens but doesn't close the modal because it's
44
48
// a character.
45
49
( ! isEditingContent ( event ) && event . key === '/' && ! isOpen )
You can’t perform that action at this time.
0 commit comments