Ensure that one emoji is added, when expected
This commit is contained in:
parent
b290b577d4
commit
c6819a5438
2 changed files with 3 additions and 7 deletions
|
@ -146,12 +146,9 @@ export const StoryViewsNRepliesModal = ({
|
||||||
|
|
||||||
const insertEmoji = useCallback(
|
const insertEmoji = useCallback(
|
||||||
(e: EmojiPickDataType) => {
|
(e: EmojiPickDataType) => {
|
||||||
if (inputApiRef.current) {
|
onUseEmoji(e);
|
||||||
inputApiRef.current.insertEmoji(e);
|
|
||||||
onUseEmoji(e);
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
[inputApiRef, onUseEmoji]
|
[onUseEmoji]
|
||||||
);
|
);
|
||||||
|
|
||||||
const [referenceElement, setReferenceElement] =
|
const [referenceElement, setReferenceElement] =
|
||||||
|
|
|
@ -152,8 +152,7 @@ export const EmojiPicker = React.memo(
|
||||||
doSend();
|
doSend();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
}
|
} else if (shortName) {
|
||||||
if (shortName) {
|
|
||||||
onPickEmoji({ skinTone: selectedTone, shortName });
|
onPickEmoji({ skinTone: selectedTone, shortName });
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
Loading…
Reference in a new issue