Skip to content

Commit 2285ac6

Browse files
committed
Fix RTL breaking IME composition rendering
Fixes #5760
1 parent b0118df commit 2285ac6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/browser/input/CompositionHelper.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ export class CompositionHelper {
7676
* @param ev The event.
7777
*/
7878
public compositionupdate(ev: Pick<CompositionEvent, 'data'>): void {
79-
this._compositionView.textContent = ev.data;
79+
// Mark text as LTR, direction=rtl is used in CSS so the end of the text is followed for long
80+
// compositions
81+
this._compositionView.textContent = `\u200E${ev.data}\u200E`;
8082
this.updateCompositionElements();
8183
setTimeout(() => {
8284
this._compositionPosition.end = this._textarea.value.length;

0 commit comments

Comments
 (0)