diff options
| author | qsm-odoo <qsm@odoo.com> | 2020-05-28 11:26:56 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2020-05-28 14:32:25 +0000 |
| commit | 0c895e0bf9c402fc109e49d063702544b58eb0b4 (patch) | |
| tree | 176bfe3871279d1dd4387cc7ddd4e137768af473 /addons/web_editor/static/src | |
| parent | ff2c9fc195bba060c3c45e42fb4dd9fc886b782d (diff) | |
[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
Diffstat (limited to 'addons/web_editor/static/src')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.editor.js | 9 |
1 files 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, + }); }); }, /** |
