diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js b/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js index 830bb286251..a34f7e8d6d3 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js +++ b/addons/web_editor/static/src/js/editor/odoo-editor/src/OdooEditor.js @@ -3080,8 +3080,8 @@ export class OdooEditor extends EventTarget { // Ensure the toolbar doesn't overflow the editor on the right. left = Math.min(window.innerWidth - OFFSET - toolbarWidth, left); // Offset left to compensate for parent context position (eg. Iframe). - left += parentContextRect.left; - this.toolbar.style.left = scrollX + left + 'px'; + const adjustedLeft = left + parentContextRect.left; + this.toolbar.style.left = scrollX + adjustedLeft + 'px'; // Get top position. let top = correctedSelectionRect.top - toolbarHeight - OFFSET;