Skip to content

Commit fd1e53c

Browse files
authored
Merge pull request #5762 from Tyriar/5760
Fix RTL breaking IME composition rendering
2 parents 18262c8 + 2285ac6 commit fd1e53c

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)