Extra check if the composer is publishing

This commit is contained in:
Lim Chee Aun 2024-05-25 09:15:43 +08:00
parent 7589ec8803
commit 9cc590be1b

View file

@ -788,9 +788,16 @@ function Compose({
}
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 (window.opener.__STATES__.composerState?.publishing) {
alert(
'Looks like you already have a compose field open in the parent window and currently publishing. Please wait for it to be done and try again later.',
);
return;
}
let confirmText =
'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?';
const yes = confirm(confirmText);
if (!yes) return;
}