Merge pull request #5762 from Tyriar/5760

Fix RTL breaking IME composition rendering
This commit is contained in:
Daniel Imms
2026-03-11 12:49:50 +09:00
committed by GitHub
+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;