Fix EmojiPicker shortcut with panel open
This commit is contained in:
parent
d71da5c486
commit
e28a07588e
1 changed files with 3 additions and 3 deletions
|
@ -122,9 +122,9 @@ export const EmojiButton = React.memo(function EmojiButtonInner({
|
|||
const commandOrCtrl = commandKey || controlKey;
|
||||
const key = KeyboardLayout.lookup(event);
|
||||
|
||||
// We don't want to open up if the conversation has any panels open
|
||||
const panels = document.querySelectorAll('.conversation .panel');
|
||||
if (panels && panels.length > 1) {
|
||||
// We don't want to open up if the current conversation panel is hidden
|
||||
const parentPanel = buttonRef.current?.closest('.ConversationPanel');
|
||||
if (parentPanel?.classList.contains('ConversationPanel__hidden')) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue