@@ -34,7 +34,6 @@ import { MOUSE_CURSOR_TEXT_CSS_CLASS_NAME } from 'vs/base/browser/ui/mouseCursor
34
34
import { TokenizationRegistry } from 'vs/editor/common/languages' ;
35
35
import { ColorId , ITokenPresentation } from 'vs/editor/common/encodedTokenAttributes' ;
36
36
import { Color } from 'vs/base/common/color' ;
37
- import { TimeoutTimer } from 'vs/base/common/async' ;
38
37
import { IME } from 'vs/base/common/ime' ;
39
38
40
39
export interface IVisibleRangeProvider {
@@ -114,7 +113,6 @@ export class TextAreaHandler extends ViewPart {
114
113
115
114
private _accessibilitySupport ! : AccessibilitySupport ;
116
115
private _accessibilityPageSize ! : number ;
117
- private _accessibilityWriteTimer : TimeoutTimer ;
118
116
private _textAreaWrapping ! : boolean ;
119
117
private _textAreaWidth ! : number ;
120
118
private _contentLeft : number ;
@@ -154,7 +152,6 @@ export class TextAreaHandler extends ViewPart {
154
152
const layoutInfo = options . get ( EditorOption . layoutInfo ) ;
155
153
156
154
this . _setAccessibilityOptions ( options ) ;
157
- this . _accessibilityWriteTimer = this . _register ( new TimeoutTimer ( ) ) ;
158
155
this . _contentLeft = layoutInfo . contentLeft ;
159
156
this . _contentWidth = layoutInfo . contentWidth ;
160
157
this . _contentHeight = layoutInfo . height ;
@@ -610,11 +607,9 @@ export class TextAreaHandler extends ViewPart {
610
607
public override onCursorStateChanged ( e : viewEvents . ViewCursorStateChangedEvent ) : boolean {
611
608
this . _selections = e . selections . slice ( 0 ) ;
612
609
this . _modelSelections = e . modelSelections . slice ( 0 ) ;
613
- if ( this . _accessibilitySupport === AccessibilitySupport . Disabled ) {
614
- this . _accessibilityWriteTimer . cancelAndSet ( ( ) => this . _textAreaInput . writeScreenReaderContent ( 'selection changed' ) , 0 ) ;
615
- } else {
616
- this . _textAreaInput . writeScreenReaderContent ( 'selection changed' ) ;
617
- }
610
+ // We must update the <textarea> synchronously, otherwise long press IME on macos breaks.
611
+ // See https://github.com/microsoft/vscode/issues/165821
612
+ this . _textAreaInput . writeScreenReaderContent ( 'selection changed' ) ;
618
613
return true ;
619
614
}
620
615
public override onDecorationsChanged ( e : viewEvents . ViewDecorationsChangedEvent ) : boolean {
0 commit comments