diff --git a/src/components/editor/EmojiSuggestionList.tsx b/src/components/editor/EmojiSuggestionList.tsx index 8d1a36f..28b8f2f 100644 --- a/src/components/editor/EmojiSuggestionList.tsx +++ b/src/components/editor/EmojiSuggestionList.tsx @@ -58,7 +58,10 @@ export const EmojiSuggestionList = forwardRef< return true; } - if (event.key === "Enter" && !event.ctrlKey && !event.metaKey) { + if ( + (event.key === "Enter" && !event.ctrlKey && !event.metaKey) || + event.key === "Tab" + ) { if (items[selectedIndex]) { command(items[selectedIndex]); } diff --git a/src/components/editor/ProfileSuggestionList.tsx b/src/components/editor/ProfileSuggestionList.tsx index 0be7b74..7efab32 100644 --- a/src/components/editor/ProfileSuggestionList.tsx +++ b/src/components/editor/ProfileSuggestionList.tsx @@ -38,7 +38,10 @@ export const ProfileSuggestionList = forwardRef< return true; } - if (event.key === "Enter" && !event.ctrlKey && !event.metaKey) { + if ( + (event.key === "Enter" && !event.ctrlKey && !event.metaKey) || + event.key === "Tab" + ) { if (items[selectedIndex]) { command(items[selectedIndex]); } diff --git a/src/components/editor/SlashCommandSuggestionList.tsx b/src/components/editor/SlashCommandSuggestionList.tsx index eb8e28d..671e3f3 100644 --- a/src/components/editor/SlashCommandSuggestionList.tsx +++ b/src/components/editor/SlashCommandSuggestionList.tsx @@ -38,7 +38,10 @@ export const SlashCommandSuggestionList = forwardRef< return true; } - if (event.key === "Enter" && !event.ctrlKey && !event.metaKey) { + if ( + (event.key === "Enter" && !event.ctrlKey && !event.metaKey) || + event.key === "Tab" + ) { if (items[selectedIndex]) { command(items[selectedIndex]); }