From 5f5b0404f7267f75c01d7e4c3898a1e26fd4b5ed Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Wed, 18 Jan 2023 14:54:04 +0000 Subject: [PATCH] [FIX] web: align text to the end in RTL languages Bootstrap forces some input types ("tel", "url", "email", "number") to be LTR even if in an RTL languages, before the last update of bootstrap this was done in [1] and [2]. The issue of forcing some input types to LTR, is that the alignment was wrong. Now, the for the same types when using an RTL language we force the align to the end. [1] : 90ab752c5fc9b27a6a40006abfe49483e7ca847d [2] : 0d650c3b19c847181fa50c88eb945792528f01cc closes odoo/odoo#110610 X-original-commit: 05b48129999978fbe8092e6007999aeae60a3699 Signed-off-by: Bruno Boi (boi) Signed-off-by: Jorge Pinna Puissant (jpp) --- addons/web/static/src/legacy/scss/ui.scss | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/addons/web/static/src/legacy/scss/ui.scss b/addons/web/static/src/legacy/scss/ui.scss index 67ee39c6ba4..1a90e27be0e 100644 --- a/addons/web/static/src/legacy/scss/ui.scss +++ b/addons/web/static/src/legacy/scss/ui.scss @@ -132,12 +132,22 @@ span.o_force_ltr { display: inline; } -.o_force_ltr, .o_field_phone { +.o_force_ltr { unicode-bidi: embed; // ensure element has level of embedding for direction /*rtl:ignore*/ direction: ltr; } +/* rtl:raw: +[type="tel"], +[type="url"], +[type="email"], +[type="number"], +.o_force_ltr { + text-align: end !important; +} +*/ + // To fill the available space while keeping aspect ratio (crop). // Assuming the important part of the image is its center. .o_object_fit_cover {