diff options
Diffstat (limited to 'program')
-rw-r--r-- | program/js/app.js | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/program/js/app.js b/program/js/app.js index 5fe58702d..d8568ce47 100644 --- a/program/js/app.js +++ b/program/js/app.js @@ -1947,7 +1947,9 @@ function rcube_webmail() html = '<span id="flagicn'+row.id+'" class="'+css_class+'"> </span>'; } else if (c == 'attachment') { - if (/application\/|multipart\/(m|signed)/.test(flags.ctype)) + if (flags.attachmentClass) + html = '<span class="'+flags.attachmentClass+'"> </span>'; + else if (/application\/|multipart\/(m|signed)/.test(flags.ctype)) html = '<span class="attachment"> </span>'; else if (/multipart\/report/.test(flags.ctype)) html = '<span class="report"> </span>'; @@ -3679,9 +3681,12 @@ function rcube_webmail() $("input[name='_draft_saveid']").val(id); // reset history of hidden iframe used for saving draft (#1489643) - if (window.frames['savetarget'] && window.frames['savetarget'].history) { + // but don't do this on timer-triggered draft-autosaving (#1489789) + if (window.frames['savetarget'] && window.frames['savetarget'].history && !this.draft_autosave_submit) { window.frames['savetarget'].history.back(); } + + this.draft_autosave_submit = false; } // always remove local copy upon saving as draft @@ -3691,7 +3696,11 @@ function rcube_webmail() this.auto_save_start = function() { if (this.env.draft_autosave) - this.save_timer = setTimeout(function(){ ref.command("savedraft"); }, this.env.draft_autosave * 1000); + this.draft_autosave_submit = false; + this.save_timer = setTimeout(function(){ + ref.draft_autosave_submit = true; // set auto-saved flag (#1489789) + ref.command("savedraft"); + }, this.env.draft_autosave * 1000); // save compose form content to local storage every 5 seconds if (!this.local_save_timer && window.localStorage) { |