From 1beea8c4f1daf8828b0a10bb6c4a6d95df7c5cef Mon Sep 17 00:00:00 2001 From: Gorash Date: Tue, 15 Dec 2020 09:00:07 +0000 Subject: [PATCH] [FIX] web_editor: use withIntangibles to find ZoneNode ZoneNodes are now intangible containers closes odoo/odoo#63384 X-original-commit: b6164a683cdca4ebdbcd802166323a83be7c6fa8 Signed-off-by: David Monjoie (dmo) --- addons/web_editor/static/src/js/wysiwyg/wysiwyg.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js index c24a3e79071..ebf23e90ac9 100644 --- a/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js +++ b/addons/web_editor/static/src/js/wysiwyg/wysiwyg.js @@ -334,7 +334,7 @@ var Wysiwyg = Widget.extend({ this.editorHelpers = this.editor.plugins.get(JWEditorLib.DomHelpers); const domLayout = this.editor.plugins.get(JWEditorLib.Layout).engines.dom; - this.zoneMain = domLayout.root.firstDescendant(node => node.managedZones && node.managedZones.includes('main')); + this.zoneMain = JWEditorLib.withIntangibles.firstDescendant(domLayout.root, node => node.managedZones && node.managedZones.includes('main')); const rootElement = this.editorHelpers.getDomNodes(domLayout.root.firstDescendant(JWEditorLib.ContainerNode))[0]; this.editorEditable = this.editorHelpers.getDomNodes(this.zoneMain)[0] || this.editorHelpers.getDomNodes(this.zoneMain.parent)[0];