FIX: prevents lightbox to close chat on escape (#22003)

No test as this is very much a hack while lightbox is being revamped. We currently have no good/easy way AFAIK to stop event propagation on escape in magnificpopup.
This commit is contained in:
Joffrey JAFFEUX 2023-06-08 15:32:35 +02:00 committed by GitHub
parent 32dd43e02c
commit 9cbbcdef50
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -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();