diff --git a/plugins/chat/assets/javascripts/discourse/initializers/chat-keyboard-shortcuts.js b/plugins/chat/assets/javascripts/discourse/initializers/chat-keyboard-shortcuts.js index b2b4ee8ba99..f038c14d265 100644 --- a/plugins/chat/assets/javascripts/discourse/initializers/chat-keyboard-shortcuts.js +++ b/plugins/chat/assets/javascripts/discourse/initializers/chat-keyboard-shortcuts.js @@ -92,6 +92,12 @@ export default { }; const closeChat = (event) => { + // TODO (joffrey): removes this when we move from magnific popup + // there's no proper way to prevent propagation in mfp + if (event.srcElement?.classList?.value?.includes("mfp-wrap")) { + return; + } + if (chatStateManager.isDrawerActive) { event.preventDefault(); event.stopPropagation();