From 0c895e0bf9c402fc109e49d063702544b58eb0b4 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 28 May 2020 11:26:56 +0000 Subject: [PATCH] [FIX] web_editor: correctly call onBlur on tab change Before this commit, the onBlur function of snippet options was not called if the blur occured because of a click on the 'Blocks' tab. Part of https://github.com/odoo/odoo/pull/52081 X-original-commit: 85049e2dcf68c40218bd0f4ed7401a4f979951d4 --- .../web_editor/static/src/js/editor/snippets.editor.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/web_editor/static/src/js/editor/snippets.editor.js b/addons/web_editor/static/src/js/editor/snippets.editor.js index b507b5d5f85..3a91fe2be1c 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -2056,10 +2056,11 @@ var SnippetsMenu = Widget.extend({ * @private */ _onBlocksTabClick: function (ev) { - this._activateSnippet(false); - this._updateLeftPanelContent({ - content: [], - tab: this.tabs.BLOCKS, + this._activateSnippet(false).then(() => { + this._updateLeftPanelContent({ + content: [], + tab: this.tabs.BLOCKS, + }); }); }, /**