Skip to content

Commit

Permalink
[ECO-2275] Focus emoji picker on input click (#351)
Browse files Browse the repository at this point in the history
  • Loading branch information
CRBl69 authored Nov 26, 2024
1 parent 295cf61 commit aa481d6
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down

0 comments on commit aa481d6

Please sign in to comment.