From 5324f7a6aa757ff6a728258ea1877ded4a6f86cd Mon Sep 17 00:00:00 2001 From: Nicolas Lempereur Date: Tue, 16 Feb 2021 13:58:36 +0000 Subject: [FIX] web_editor: stop loading button once ace saved When we edit a view with ace in eg. studio, if it works the saved button would never be enabled again because of missing callback. Match the behavior of dom.addButtonLoadingEffect other usage (80592abd). opw-2457046 closes odoo/odoo#66269 Signed-off-by: Nicolas Lempereur (nle) --- addons/web_editor/static/src/js/common/ace.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons/web_editor/static') diff --git a/addons/web_editor/static/src/js/common/ace.js b/addons/web_editor/static/src/js/common/ace.js index 769b4f33023..439a27d55cc 100644 --- a/addons/web_editor/static/src/js/common/ace.js +++ b/addons/web_editor/static/src/js/common/ace.js @@ -914,7 +914,7 @@ var ViewEditor = Widget.extend({ */ _onSaveClick: function (ev) { const restore = dom.addButtonLoadingEffect(ev.currentTarget); - this._saveResources().guardedCatch(restore); + this._saveResources().then(restore).guardedCatch(restore); }, /** * Called when the user wants to switch from xml to scss or vice-versa -> -- cgit v1.2.3