From 74284afc079c60d51f7d3149b6159b1845028234 Mon Sep 17 00:00:00 2001 From: nathangray Date: Wed, 24 Jun 2020 09:58:18 -0600 Subject: [PATCH] Fix htmlarea.isDirty() was using the pre-editor initialization value causing it to always be true --- api/js/etemplate/et2_widget_htmlarea.js | 1 + api/js/etemplate/et2_widget_htmlarea.ts | 1 + 2 files changed, 2 insertions(+) diff --git a/api/js/etemplate/et2_widget_htmlarea.js b/api/js/etemplate/et2_widget_htmlarea.js index 08c550a5ea..d0ef3858f0 100644 --- a/api/js/etemplate/et2_widget_htmlarea.js +++ b/api/js/etemplate/et2_widget_htmlarea.js @@ -147,6 +147,7 @@ var et2_htmlarea = /** @class */ (function (_super) { // inside an inactive tabs this.tinymce.then(function () { self.set_value(self.htmlNode.val()); + self.resetDirty(); if (self.editor && self.editor.editorContainer) { self.editor.formatter.toggle(egw.preference('rte_formatblock', 'common')); jQuery(self.editor.editorContainer).height(self.options.height); diff --git a/api/js/etemplate/et2_widget_htmlarea.ts b/api/js/etemplate/et2_widget_htmlarea.ts index 15a96068b1..6b53718029 100644 --- a/api/js/etemplate/et2_widget_htmlarea.ts +++ b/api/js/etemplate/et2_widget_htmlarea.ts @@ -268,6 +268,7 @@ class et2_htmlarea extends et2_editableWidget implements et2_IResizeable // inside an inactive tabs this.tinymce.then(function() { self.set_value(self.htmlNode.val()); + self.resetDirty(); if (self.editor && self.editor.editorContainer) { self.editor.formatter.toggle(egw.preference('rte_formatblock', 'common'));