Fixed hotkey bug with Select component and added debug logs for hotkeys (#4879)

- Select component was adding a duplicate useListenClickOutside already
present in useDropdown for closing dropdown.
- Added debug logs for hotkeys scopes
This commit is contained in:
Lucas Bordeau
2024-04-08 17:08:30 +02:00
committed by GitHub
parent 038b2c0efc
commit 97f9fc3f81
5 changed files with 35 additions and 13 deletions

View File

@ -145,6 +145,7 @@ const TextInputComponent = (
const handleFocus: FocusEventHandler<HTMLInputElement> = (e) => {
onFocus?.(e);
if (!disableHotkeys) {
setHotkeyScopeAndMemorizePreviousScope(InputHotkeyScope.TextInput);
}
@ -152,6 +153,7 @@ const TextInputComponent = (
const handleBlur: FocusEventHandler<HTMLInputElement> = (e) => {
onBlur?.(e);
if (!disableHotkeys) {
goBackToPreviousHotkeyScope();
}