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 commandOrCtrl = commandKey || controlKey;
|
||||||
const key = KeyboardLayout.lookup(event);
|
const key = KeyboardLayout.lookup(event);
|
||||||
|
|
||||||
// We don't want to open up if the conversation has any panels open
|
// We don't want to open up if the current conversation panel is hidden
|
||||||
const panels = document.querySelectorAll('.conversation .panel');
|
const parentPanel = buttonRef.current?.closest('.ConversationPanel');
|
||||||
if (panels && panels.length > 1) {
|
if (parentPanel?.classList.contains('ConversationPanel__hidden')) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue