Просмотр исходного кода

Merge pull request #8682 from weseek/fix/144023-tags-are-unintentionally-created-when-a-conversion-is-finalized

fix: Tags are unintentionally created when a conversion is finalized
Yuki Takei 2 лет назад
Родитель
Сommit
91a0e098cb
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      apps/app/src/components/PageTags/TagsInput.tsx

+ 6 - 0
apps/app/src/components/PageTags/TagsInput.tsx

@@ -42,6 +42,12 @@ export const TagsInput: FC<Props> = (props: Props) => {
     if (event.key === ' ') {
       event.preventDefault();
 
+      // fix: https://redmine.weseek.co.jp/issues/140689
+      const isComposing = event.nativeEvent.isComposing;
+      if (isComposing) {
+        return;
+      }
+
       const initialItem = tagsInputRef?.current?.state?.initialItem;
       const handleMenuItemSelect = tagsInputRef?.current?._handleMenuItemSelect;