Fix RTL breaking IME composition rendering

Fixes #5760
This commit is contained in:
Daniel Imms
2026-03-11 12:41:48 +09:00
parent b0118dfd3a
commit 2285ac6ab8
+3 -1
View File
@@ -76,7 +76,9 @@ export class CompositionHelper {
* @param ev The event.
*/
public compositionupdate(ev: Pick<CompositionEvent, 'data'>): void {
this._compositionView.textContent = ev.data;
// Mark text as LTR, direction=rtl is used in CSS so the end of the text is followed for long
// compositions
this._compositionView.textContent = `\u200E${ev.data}\u200E`;
this.updateCompositionElements();
setTimeout(() => {
this._compositionPosition.end = this._textarea.value.length;