fix: Keyboard handlers should not be considered while composing

This commit is contained in:
Tom Moor
2023-07-04 11:28:05 -04:00
parent 29db1ef1bf
commit e6e9512979
4 changed files with 19 additions and 1 deletions

View File

@@ -260,6 +260,9 @@ function SuggestionsMenu<T extends MenuItem>(props: Props<T>) {
const handleLinkInputKeydown = (
event: React.KeyboardEvent<HTMLInputElement>
) => {
if (event.nativeEvent.isComposing) {
return;
}
if (!props.isActive) {
return;
}
@@ -441,6 +444,9 @@ function SuggestionsMenu<T extends MenuItem>(props: Props<T>) {
};
const handleKeyDown = (event: KeyboardEvent) => {
if (event.isComposing) {
return;
}
if (!props.isActive) {
return;
}