summaryrefslogtreecommitdiff
path: root/addons/web_editor
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor')
-rw-r--r--addons/web_editor/static/src/js/backend/fields.js3
-rw-r--r--addons/web_editor/static/src/js/editor/rte.js2
2 files changed, 4 insertions, 1 deletions
diff --git a/addons/web_editor/static/src/js/backend/fields.js b/addons/web_editor/static/src/js/backend/fields.js
index 00c02e20513..95afaa90073 100644
--- a/addons/web_editor/static/src/js/backend/fields.js
+++ b/addons/web_editor/static/src/js/backend/fields.js
@@ -51,6 +51,9 @@ var FieldTextHtmlSimple = basic_fields.DebouncedField.extend(TranslatableFieldMi
var layoutInfo = this.$textarea.data('layoutInfo');
$.summernote.pluginEvents.codeview(undefined, undefined, layoutInfo, false);
}
+ if (this._getValue() !== this.value) {
+ this._isDirty = true;
+ }
this._super.apply(this, arguments);
},
/**
diff --git a/addons/web_editor/static/src/js/editor/rte.js b/addons/web_editor/static/src/js/editor/rte.js
index c0e2218d974..6da2ea72ea1 100644
--- a/addons/web_editor/static/src/js/editor/rte.js
+++ b/addons/web_editor/static/src/js/editor/rte.js
@@ -405,7 +405,7 @@ var RTEWidget = Widget.extend({
var $el = $(el);
$el.find('[class]').filter(function () {
- if (!this.className.match(/\S/)) {
+ if (!this.getAttribute('class').match(/\S/)) {
this.removeAttribute('class');
}
});