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 d5101f0768b..da11ac9b811 100644 --- a/addons/web_editor/static/src/js/editor/snippets.editor.js +++ b/addons/web_editor/static/src/js/editor/snippets.editor.js @@ -348,6 +348,11 @@ var SnippetEditor = Widget.extend({ this.destroy(); $parent.trigger('content_changed'); + // TODO Page content changed, some elements may need to be adapted + // according to it. While waiting for a better way to handle that this + // window trigger will handle most cases. + $(window).trigger('resize'); + function isEmptyAndRemovable($el, editor) { editor = editor || $el.data('snippet-editor'); return $el.children().length === 0 && $el.text().trim() === ''