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:
parent
32dd43e02c
commit
9cbbcdef50
|
@ -92,6 +92,12 @@ export default {
|
||||||
};
|
};
|
||||||
|
|
||||||
const closeChat = (event) => {
|
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) {
|
if (chatStateManager.isDrawerActive) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
Loading…
Reference in New Issue