missive / emoji-mart

🏪 One component to pick them all
https://missiveapp.com/open/emoji-mart
MIT License
8.59k stars 825 forks source link

allow escape listeners #908

Closed Zerebokep closed 2 months ago

Zerebokep commented 5 months ago

I would like to close the picker with a single push on Escape even if the input field is focused, currently it's required to push the key 2-3 times (depending if something was entered or not).

Unfortunately it doesn't seem to be possible to do this with event listeners, I think this is the related line: https://github.com/missive/emoji-mart/blob/21a2708be931c0dd16d6d0e96b47a45503576ac5/packages/emoji-mart/src/components/Picker/Picker.tsx#L243