From 432778725d0ed1777edb2793737d802b5ebd035f Mon Sep 17 00:00:00 2001 From: aath-odoo Date: Thu, 25 Jan 2024 16:42:12 +0530 Subject: [PATCH] [FIX] web_editor: rtl table menu misalignment Previously, In RTL mode, the table columns menu were misaligned, causing a visual discrepancy in the UI.Now, Implemented a fix to correctly position the table menu columns in RTL mode, ensuring proper alignment and resolving the visual misalignment issue. task-3695715 closes odoo/odoo#153327 X-original-commit: 331f95265f6ba04369b654811cd594cc083a54d9 Signed-off-by: Antoine Guenet (age) Signed-off-by: Aashish Thakur (aath) --- .../src/js/editor/odoo-editor/src/OdooEditor.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) 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 ba6937af5dd..b0566eb399f 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 @@ -2959,10 +2959,14 @@ export class OdooEditor extends EventTarget { let left; let top; - if (isRow && isRtl) { - left = tableRect.right - tableUiContainerRect.x; - } else if (isRow && !isRtl) { - left = elementRect.left - tableUiContainerRect.left - (isRow ? wrappedUi.clientWidth : 0); + if (isRow) { + if (isRtl) { + left = tableRect.right - tableUiContainerRect.x; + } else { + left = elementRect.left - tableUiContainerRect.left - wrappedUi.clientWidth; + } + } else if (isRtl) { + left = elementRect.left - tableUiContainerRect.left + wrappedUi.clientWidth; } else { left = elementRect.left - tableUiContainerRect.left - (isRow ? wrappedUi.clientWidth : 0); }