fix: only navigate to last tag on backspace if input is empty
This commit is contained in:
@@ -100,7 +100,7 @@ export const AutocompleteTagInput: FunctionalComponent<Props> = ({
|
|||||||
onBlur={closeOnBlur}
|
onBlur={closeOnBlur}
|
||||||
onFocus={showDropdown}
|
onFocus={showDropdown}
|
||||||
onKeyUp={(event) => {
|
onKeyUp={(event) => {
|
||||||
if (event.key === 'Backspace') {
|
if (event.key === 'Backspace' && searchQuery === '') {
|
||||||
lastTagRef.current?.focus();
|
lastTagRef.current?.focus();
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
|
|||||||
Reference in New Issue
Block a user