From 983fa6c97440a3ba0df33556a7f45fd7b763af18 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Mon, 5 Oct 2026 04:49:02 +0200 Subject: [PATCH] fix: mixed Arabic and English lines in a message all take the first line's direction (#31868) When a message mixed right-to-left and left-to-right lines, the chat input and the sent message gave every line the direction of the first one, so an English line under an Arabic one showed up as "?Hello, how are you" with the question mark at the start and sat on the wrong side. Each line now picks its own direction and alignment, both while typing and in the sent message. With Chat Direction set to LTR or RTL instead of Auto, lines in the input box now also align by their own language, the way sent messages already did. Fixes #31827 --- src/app.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/app.css b/src/app.css index fee41b409f..9228db7c6b 100644 --- a/src/app.css +++ b/src/app.css @@ -415,6 +415,16 @@ input[type='number'] { outline: none; } +/* Each line picks its own direction so mixed RTL/LTR text reads correctly. */ +.ProseMirror p { + unicode-bidi: plaintext; + text-align: start; +} + +p[dir='auto'] { + unicode-bidi: plaintext; +} + :focus-visible:not(.ProseMirror):not([contenteditable='true']):not(input):not(textarea), .focus-ring:focus-visible { outline: 2px solid theme(--color-blue-500);