From 537b8d354c43a9ce0308c25b5b7ae7aded85fcf5 Mon Sep 17 00:00:00 2001 From: "Mahdi Cheikh Rouhou (macr)" Date: Thu, 14 Mar 2024 09:52:58 +0000 Subject: [PATCH] [FIX] web_editor: position powerbox correctly in rtl direction Issue: ====== The powerbox keep increasing in size when you input. Steps to reproduce the issue: ============================= - Install arabic - Go to notes - write `/`, you can see the powerbox is a bit smal - use `down/up`arrows to navigate in the powerbox. - The powerbox width increase until finally gets to it's intended position. Origin of the issue: ==================== Since we are providing that `marginRigh` should be equals to `20` in `getRangePosition` we will move the powerbox to the left a bit and then with the style property `max-width=100%` it will increase in size because the current size is a bit small for it. So at every key pressed it will increase by 20px until it gets to a point where everything is set and the `marginRight=20` is finally visible. Soltuion: ========= We set min-width as max-content so we can position correctly the powerbox knowing it's final width. task-3721794 closes odoo/odoo#161924 X-original-commit: b815447bf239049b37a3705cd014c67e3897ba9c Signed-off-by: David Monjoie (dmo) Signed-off-by: Mahdi Cheikh Rouhou (macr) --- .../web_editor/static/src/js/editor/odoo-editor/src/style.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/web_editor/static/src/js/editor/odoo-editor/src/style.scss b/addons/web_editor/static/src/js/editor/odoo-editor/src/style.scss index fce5c6262d5..4a2a6407b82 100644 --- a/addons/web_editor/static/src/js/editor/odoo-editor/src/style.scss +++ b/addons/web_editor/static/src/js/editor/odoo-editor/src/style.scss @@ -336,6 +336,7 @@ max-height: 40vh; box-sizing: border-box; box-shadow: $box-shadow; + min-width: max-content; ::-webkit-scrollbar { background: transparent;