Handle pop-in case when there's already a Compose field open

Show confirmation first before popping-in
pull/2/head
Lim Chee Aun 2022-12-15 13:03:20 +08:00
rodzic b987b525ef
commit fc235024aa
1 zmienionych plików z 7 dodań i 0 usunięć

Wyświetl plik

@ -408,6 +408,13 @@ function Compose({
return;
}
if (window.opener.__STATES__.showCompose) {
const yes = confirm(
'Looks like you already have a compose field open in the parent window. Popping in this window will discard the changes you made in the parent window. Continue?',
);
if (!yes) return;
}
const mediaAttachmentsWithIDs = mediaAttachments.filter(
(media) => media.id,
);