Przeglądaj źródła

event.key -> event.code

Shun Miyazawa 1 rok temu
rodzic
commit
68caa4868c
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      apps/app/src/components/PageTags/TagsInput.tsx

+ 1 - 1
apps/app/src/components/PageTags/TagsInput.tsx

@@ -39,7 +39,7 @@ export const TagsInput: FC<Props> = (props: Props) => {
   }, [tagsSearch?.tags]);
 
   const keyDownHandler = useCallback((event: KeyboardEvent<HTMLElement>) => {
-    if (event.key === ' ' || event.key === ' ') {
+    if (event.code === 'Space') {
       event.preventDefault();
 
       // fix: https://redmine.weseek.co.jp/issues/140689