mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-21 16:55:25 +03: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;
|
||||
}
|
||||
|
||||
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,
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue