[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) <age@odoo.com>
Signed-off-by: Aashish Thakur (aath) <aath@odoo.com>
This commit is contained in:
aath-odoo
2024-02-09 05:41:04 +00:00
parent 5956786c34
commit 432778725d
@@ -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);
}