From 0d56f9963b2d27dba8839bc629240e128a7aeb5f Mon Sep 17 00:00:00 2001 From: "Eteil Djoumatchoua(etdj)" Date: Thu, 30 Mar 2023 11:26:13 +0000 Subject: [PATCH] [FIX] website: render well the price range widget in RTL languages Steps: - Go to website/shop (with price range widget enabled) - Change the language to Arabic Issue: the numbers on the price range widget are overflowing Cause: The element leftCounter's right style property is always set to 0px. So when changing the direction it's always on the right as his position is absolute. Solution: Built-in handle by Bootstrap with end-0 Fixes #108557 opw-3221051 closes odoo/odoo#120568 X-original-commit: 4e05d93dce31f9a829961bded855a6cb7e8de7f3 Signed-off-by: Romain Derie (rde) --- addons/website/static/lib/multirange/multirange_custom.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/addons/website/static/lib/multirange/multirange_custom.js b/addons/website/static/lib/multirange/multirange_custom.js index e1097998d28..eed01daf1f5 100644 --- a/addons/website/static/lib/multirange/multirange_custom.js +++ b/addons/website/static/lib/multirange/multirange_custom.js @@ -95,8 +95,7 @@ export class Multirange { this.leftCounter = document.createElement("span"); this.leftCounter.classList.add("multirange-min", "position-absolute", "opacity-75", "opacity-100-hover", "mt-1"); this.rightCounter = document.createElement("span"); - this.rightCounter.classList.add("multirange-max", "position-absolute", "opacity-75", "opacity-100-hover", "mt-1"); - this.rightCounter.style.right = 0; + this.rightCounter.classList.add("multirange-max", "position-absolute", "opacity-75", "opacity-100-hover", "mt-1", "end-0"); this.countersWrapper.append(this.leftCounter, this.rightCounter); /* Add the counterInput */