diff --git a/src/typescript/frontend/src/components/emoji-picker/EmojiPickerWithInput.tsx b/src/typescript/frontend/src/components/emoji-picker/EmojiPickerWithInput.tsx index 498e1803a..026c9a352 100644 --- a/src/typescript/frontend/src/components/emoji-picker/EmojiPickerWithInput.tsx +++ b/src/typescript/frontend/src/components/emoji-picker/EmojiPickerWithInput.tsx @@ -239,7 +239,15 @@ export const EmojiPickerWithInput = ({ e.stopPropagation(); }} onClick={() => { + const shadowRoot = document.querySelector("em-emoji-picker") + ?.shadowRoot as ShadowRoot; + const pickerInputElement = shadowRoot.querySelector( + "div.search input" + ) as HTMLInputElement; setPickerInvisible(false); + if (pickerInvisible) { + pickerInputElement.focus(); + } }} data-testid="emoji-input" style={{ fontFamily: EMOJI_FONT_FAMILY }}