Skip to content

Commit 1c1aac0

Browse files
authored
Update src/browser/input/CompositionHelper.ts
1 parent beeebca commit 1c1aac0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/browser/input/CompositionHelper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ export class CompositionHelper {
7272
*/
7373
public compositionstart(): void {
7474
this._isComposing = true;
75+
// It's important to use the selection here instead of textarea length to avoid conflicts with
76+
// screen reader mode
7577
const start = this._textarea.selectionStart ?? this._textarea.value.length;
7678
const end = this._textarea.selectionEnd ?? start;
7779
this._compositionPosition.start = Math.min(start, end);

0 commit comments

Comments
 (0)