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