diff --git a/app/views/enhanced_ux/issues/_custom_issue.html.erb b/app/views/enhanced_ux/issues/_custom_issue.html.erb index c04266f..f1d84e5 100644 --- a/app/views/enhanced_ux/issues/_custom_issue.html.erb +++ b/app/views/enhanced_ux/issues/_custom_issue.html.erb @@ -323,7 +323,12 @@ .attr("id", "quick_notes2-submit-button") .text(resources.labelSubmitQuickNotesWithAttachments) .on("click", () => { - asyncAjaxSubmitNotesWithAttachments().then(resetForm); + asyncAjaxSubmitNotesWithAttachments().then(() => { + resetForm(); + $("textarea#issue_notes") + .removeData("changed") + .removeAttr("data-changed"); // Suppor for 2-pane mode + }); }) .appendTo($quickNotes2Buttons); diff --git a/app/views/enhanced_ux/layouts/_two_pane_mode.html.erb b/app/views/enhanced_ux/layouts/_two_pane_mode.html.erb index 367ffe9..c50cfea 100644 --- a/app/views/enhanced_ux/layouts/_two_pane_mode.html.erb +++ b/app/views/enhanced_ux/layouts/_two_pane_mode.html.erb @@ -921,7 +921,14 @@ switchable() { if (!this.checkTextAreaChange()) return true; - return confirm(warnLeavingUnsavedMessage); + if (confirm(warnLeavingUnsavedMessage)) { + // Clear all flags + $("textarea", this.$iframe.contents()).each(function () { + $(this).removeData("changed").removeAttr("data-changed"); + }); + return true; + } + return false; } checkTextAreaChange() {