Fix open compose windows created new drafts after main window was reloaded

This commit is contained in:
nathan 2022-10-05 14:30:43 -06:00
parent fc716d0e6e
commit 17b900349d

View File

@ -4000,9 +4000,10 @@ app.classes.mail = AppJS.extend(
}
else
{
self.egw.json('mail.mail_compose.ajax_saveAsDraft',[content, action],function(_data){
var res = self.savingDraft_response(_data,action);
// Send request through framework main window, so it works even if the main window is reloaded
framework.egw_appWindow().egw.json('mail.mail_compose.ajax_saveAsDraft', [content, action], function (_data)
{
var res = self.savingDraft_response(_data, action);
if (res)
{
_resolve();