Skip to content

Commit e2018aa

Browse files
Merge pull request #50974 from bernhardoj/fix/50314-context-menu-immediately-closes-when-open-it-while-emoji-picker-is-open
Fix when emoji picker is opened, right-clicking on message opens and closes context menu
2 parents 91c6e0c + f4421c2 commit e2018aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/EmojiPicker/EmojiPicker.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ function EmojiPicker({viewportOffsetTop}: EmojiPickerProps, ref: ForwardedRef<Em
5656
*
5757
* Don't directly get the ref from emojiPopoverAnchorRef, instead use getEmojiPopoverAnchor()
5858
*/
59-
const getEmojiPopoverAnchor = useCallback(() => emojiPopoverAnchorRef.current ?? emojiPopoverAnchorRef?.current, []);
59+
const getEmojiPopoverAnchor = useCallback(() => emojiPopoverAnchorRef.current ?? (emojiPopoverAnchorRef as EmojiPopoverAnchor), []);
6060

6161
/**
6262
* Show the emoji picker menu.

0 commit comments

Comments
 (0)