File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/Common/Hooks/UseRegisterShortcut Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -121,15 +121,20 @@ const UseRegisterShortcutProvider = ({
121
121
}
122
122
123
123
if (
124
- ignoredTags . map ( ( tag ) => tag . toUpperCase ( ) ) . indexOf ( ( event . target as HTMLElement ) . tagName . toUpperCase ( ) ) >
124
+ ignoredTags . map ( ( tag ) => tag . toUpperCase ( ) ) . indexOf ( ( event . target as HTMLElement ) . tagName ? .toUpperCase ( ) ) >
125
125
- 1 ||
126
126
( event . target as HTMLElement ) ?. role === 'textbox' ||
127
127
disableShortcutsRef . current
128
128
) {
129
129
return
130
130
}
131
131
132
- keysDownRef . current . add ( event . key . toUpperCase ( ) as Uppercase < string > )
132
+ // NOTE: in case of custom events generated by password managers autofill, the event.key is not set
133
+ if ( ! event . key ) {
134
+ return
135
+ }
136
+
137
+ keysDownRef . current . add ( event . key ?. toUpperCase ( ) as Uppercase < string > )
133
138
134
139
if ( event . ctrlKey ) {
135
140
keysDownRef . current . add ( 'CONTROL' )
You can’t perform that action at this time.
0 commit comments