[REF] web_editor: cancel method of RTE should be async

and return its deferred. This commit makes the behavior consistent with
the `save` method.
This commit is contained in:
Simon Lejeune
2016-07-05 17:44:56 +02:00
parent 5c54571f4e
commit eed7fdb6fe
+1 -1
View File
@@ -130,7 +130,7 @@ editor.Class = Widget.extend({
return this.rte.save();
},
cancel: function () {
new $.Deferred(function (d) {
return new $.Deferred(function (d) {
if (!rte.history.getEditableHasUndo().length) {
return d.resolve();
}