Skip to content

Commit 79d62fa

Browse files
authored
Merge pull request #710 from CodinGame/lmn/backport-editor-focus-issue
Backport focus tracking conflict fix
2 parents c37d829 + d642fbc commit 79d62fa

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2+
From: =?UTF-8?q?Lo=C3=AFc=20Mangeonjean?= <loic@coderpad.io>
3+
Date: Mon, 29 Sep 2025 18:07:16 +0200
4+
Subject: [PATCH] fix: fix focus conflict
5+
6+
when 2 focusTracers are focused in the same event loop iteration, the first one never receive the blur even, and continue to think it's focused
7+
---
8+
.../controller/editContext/native/nativeEditContextUtils.ts | 1 +
9+
1 file changed, 1 insertion(+)
10+
11+
diff --git a/src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.ts b/src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.ts
12+
index b9504d9082a..d0ab9a1f150 100644
13+
--- a/src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.ts
14+
+++ b/src/vs/editor/browser/controller/editContext/native/nativeEditContextUtils.ts
15+
@@ -63,6 +63,7 @@ export class FocusTracker extends Disposable {
16+
public focus(): void {
17+
this._domNode.focus();
18+
this.refreshFocusState();
19+
+ setTimeout(() => this.refreshFocusState(), 0);
20+
}
21+
22+
public refreshFocusState(): void {

0 commit comments

Comments
 (0)