mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-22 16:46:28 +01:00
Handle pop-in case when there's already a Compose field open
Show confirmation first before popping-in
This commit is contained in:
parent
b987b525ef
commit
fc235024aa
1 changed files with 7 additions and 0 deletions
|
@ -408,6 +408,13 @@ function Compose({
|
||||||
return;
|
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(
|
const mediaAttachmentsWithIDs = mediaAttachments.filter(
|
||||||
(media) => media.id,
|
(media) => media.id,
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in a new issue