Skip to content
This repository was archived by the owner on May 5, 2021. It is now read-only.

Commit 16f94e6

Browse files
Gorashdmo-odoo
authored andcommitted
[FIX] OdooWebsiteEditor: On mobile, shows the boudary box inside
1 parent f7beb24 commit 16f94e6

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

packages/bundle-odoo-website-editor/OdooWebsiteEditor.ts

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,10 @@ export class OdooWebsiteEditor extends JWEditor {
191191
<t t-zone="tools"/>
192192
</div>
193193
<div class="d-flex flex-grow-1 overflow-auto">
194-
<t t-zone="snippetManipulators"/>
195-
<t t-zone="main"/>
194+
<t-theme name="default">
195+
<t t-zone="snippetManipulators"/>
196+
<t t-zone="main"/>
197+
</t-theme>
196198
</div>
197199
</div>
198200
<t t-zone="main_sidebar"/>
@@ -240,11 +242,6 @@ export class OdooWebsiteEditor extends JWEditor {
240242
const zone = new ZoneNode({ managedZones: ['editable'] });
241243
zone.editable = true;
242244
div.append(zone);
243-
if (options.devicePreview) {
244-
const theme = new ThemeNode();
245-
theme.append(div);
246-
return [theme];
247-
}
248245
return [div];
249246
},
250247
},
@@ -285,8 +282,7 @@ export class OdooWebsiteEditor extends JWEditor {
285282
this.configure(DevicePreview, {
286283
getTheme(editor: JWEditor) {
287284
const layout = editor.plugins.get(Layout);
288-
const domLayout = layout.engines.dom;
289-
return domLayout.components.main[0] as ThemeNode;
285+
return layout.engines.dom.root.firstDescendant(ThemeNode);
290286
},
291287
});
292288
}

0 commit comments

Comments
 (0)