From badd2956bbb6e6c1d2cd35f6205fbe1540ca8233 Mon Sep 17 00:00:00 2001 From: Aiday Marlen Kyzy Date: Tue, 24 Jun 2025 12:53:10 +0200 Subject: [PATCH] First resume the focus tracker then focus (#252275) first resume the focus tracker then focus --- .../controller/editContext/native/nativeEditContext.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts b/src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts index 896ab972721..3836bdf8e1d 100644 --- a/src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts +++ b/src/vs/editor/browser/controller/editContext/native/nativeEditContext.ts @@ -203,8 +203,8 @@ export class NativeEditContext extends AbstractEditContext { let reenableTracking: boolean = false; this._register(IME.onDidChange(() => { if (IME.enabled && reenableTracking) { - this.domNode.focus(); this._focusTracker.resume(); + this.domNode.focus(); reenableTracking = false; } if (!IME.enabled && this.isFocused()) { @@ -593,7 +593,7 @@ export class NativeEditContext extends AbstractEditContext { const delta2 = now - this._screenReaderSupport.getIgnoreSelectionChangeTime(); this._screenReaderSupport.resetSelectionChangeTime(); if (delta2 < 100) { - // received a `selectionchange` event within 100ms since we touched the textarea + // received a `selectionchange` event within 100ms since we touched the edit context // => ignore it, since we caused it return; }