diff options
| author | Benjamin Vray <bvr@odoo.com> | 2020-11-20 09:27:49 +0000 |
|---|---|---|
| committer | qsm-odoo <qsm@odoo.com> | 2021-01-27 14:54:14 +0000 |
| commit | a67f7df31a9e5a5550d54d52ae506299f4a62581 (patch) | |
| tree | 830ecc205f668f24d185257f22d3e08405b0d879 /addons/web_editor/static/src/js | |
| parent | 2f38816f279717bca38166a22c4f692a7f1d10c0 (diff) | |
[FIX] web_editor: close open invisible elements before deleting it
Before this commit, open invisible elements were not closed before
being deleted. This created issues like the 'modal-open' class wich
was not removed from the body when removing a modal.
Part of https://github.com/odoo/odoo/pull/61998
task-2312878
Diffstat (limited to 'addons/web_editor/static/src/js')
| -rw-r--r-- | addons/web_editor/static/src/js/editor/snippets.editor.js | 2 |
1 files changed, 2 insertions, 0 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 f19764dce46..0ebf68345e1 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -297,6 +297,8 @@ var SnippetEditor = Widget.extend({ removeSnippet: async function () { this.toggleOverlay(false); this.toggleOptions(false); + // If it is an invisible element, we must close it before deleting it (e.g. modal) + await this.toggleTargetVisibility(!this.$target.hasClass('o_snippet_invisible')); await new Promise(resolve => { this.trigger_up('call_for_each_child_snippet', { |
