[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 X-original-commit: a67f7df31a9e5a5550d54d52ae506299f4a62581
This commit is contained in:
@@ -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', {
|
||||
|
||||
Reference in New Issue
Block a user