summaryrefslogtreecommitdiff
path: root/addons/web_editor/static/src/js/editor.js
diff options
context:
space:
mode:
Diffstat (limited to 'addons/web_editor/static/src/js/editor.js')
-rw-r--r--addons/web_editor/static/src/js/editor.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/addons/web_editor/static/src/js/editor.js b/addons/web_editor/static/src/js/editor.js
index f74df98b42a..88d86bc825b 100644
--- a/addons/web_editor/static/src/js/editor.js
+++ b/addons/web_editor/static/src/js/editor.js
@@ -120,8 +120,7 @@ editor.Class = Widget.extend({
});
},
rte_changed: function () {
- // todo: use !rte.history.getEditableHasUndo().length (but phantomjs unknow error)
- this.$('button[data-action=save]').prop('disabled', !$('.o_dirty').length);
+ this.$('button[data-action=save]').prop('disabled', !rte.history.getEditableHasUndo().length);
},
save: function () {
return this.rte.save().then(function () {