From e139c11235544525de069c10dcf3c891351a5086 Mon Sep 17 00:00:00 2001 From: GengJun Date: Fri, 18 Nov 2022 01:17:51 +0900 Subject: [PATCH] Fix: Mentions Example (#5191) --- site/examples/mentions.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/examples/mentions.tsx b/site/examples/mentions.tsx index d336f50d7..c95f06c7e 100644 --- a/site/examples/mentions.tsx +++ b/site/examples/mentions.tsx @@ -31,7 +31,7 @@ const MentionExample = () => { const onKeyDown = useCallback( event => { - if (target) { + if (target && chars.length > 0) { switch (event.key) { case 'ArrowDown': event.preventDefault()