From 175c1fe36992bc3e704bfbb9d72dad1a83d35804 Mon Sep 17 00:00:00 2001 From: nathangray Date: Thu, 25 Jun 2020 10:31:48 -0600 Subject: [PATCH] Fix selectbox resetDirty() --- api/js/etemplate/et2_widget_selectbox.js | 3 +++ api/js/etemplate/et2_widget_selectbox.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/api/js/etemplate/et2_widget_selectbox.js b/api/js/etemplate/et2_widget_selectbox.js index 71d791aee7..bbc4dd167d 100644 --- a/api/js/etemplate/et2_widget_selectbox.js +++ b/api/js/etemplate/et2_widget_selectbox.js @@ -346,6 +346,9 @@ var et2_selectbox = /** @class */ (function (_super) { et2_selectbox.prototype.doLoadingFinished = function () { _super.prototype.doLoadingFinished.call(this); this.set_tags(this.options.tags, this.options.width); + // Reset dirty again here. super.doLoadingFinished() does it too, but set_tags() & others + // change things. Moving set_tags() before super.doLoadingFinished() breaks tag widgets + this.resetDirty(); return true; }; et2_selectbox.prototype.loadFromXML = function (_node) { diff --git a/api/js/etemplate/et2_widget_selectbox.ts b/api/js/etemplate/et2_widget_selectbox.ts index a8092762f9..a22a953013 100644 --- a/api/js/etemplate/et2_widget_selectbox.ts +++ b/api/js/etemplate/et2_widget_selectbox.ts @@ -488,6 +488,10 @@ export class et2_selectbox extends et2_inputWidget this.set_tags(this.options.tags, this.options.width); + // Reset dirty again here. super.doLoadingFinished() does it too, but set_tags() & others + // change things. Moving set_tags() before super.doLoadingFinished() breaks tag widgets + this.resetDirty(); + return true; }