Disable emoji and sticker pickers if conversation has open panels
This commit is contained in:
parent
01bf53776b
commit
0512d08d61
2 changed files with 12 additions and 0 deletions
|
@ -88,6 +88,12 @@ export const EmojiButton = React.memo(
|
|||
const { ctrlKey, key, metaKey, shiftKey } = event;
|
||||
const ctrlOrCommand = metaKey || ctrlKey;
|
||||
|
||||
// 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) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctrlOrCommand && shiftKey && (key === 'e' || key === 'E')) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
|
|
@ -154,6 +154,12 @@ export const StickerButton = React.memo(
|
|||
const { ctrlKey, key, metaKey, shiftKey } = event;
|
||||
const ctrlOrCommand = metaKey || ctrlKey;
|
||||
|
||||
// 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) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (ctrlOrCommand && shiftKey && (key === 's' || key === 'S')) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
|
|
Loading…
Add table
Reference in a new issue