From 8685f30dca60cd1f68fb078f0edada667e8aec4c Mon Sep 17 00:00:00 2001 From: isidor Date: Tue, 5 Jan 2016 18:38:24 +0100 Subject: [PATCH] debug: conditiaonl breakpoint focus fix --- src/vs/workbench/parts/debug/browser/breakpointWidget.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/parts/debug/browser/breakpointWidget.ts b/src/vs/workbench/parts/debug/browser/breakpointWidget.ts index fa262f6dc83..0d3169785b1 100644 --- a/src/vs/workbench/parts/debug/browser/breakpointWidget.ts +++ b/src/vs/workbench/parts/debug/browser/breakpointWidget.ts @@ -40,8 +40,8 @@ export class BreakpointWidget extends ZoneWidget { }); dom.addClass(this.inputBox.inputElement, platform.isWindows ? 'windows' : platform.isMacintosh ? 'mac' : 'linux'); this.inputBox.value = (breakpoint && breakpoint.condition) ? breakpoint.condition : ''; - // TODO@Isidor check with Alex why does the editor steal focus - setTimeout(() => this.inputBox.focus(), 150); + // Due to an electron bug we have to do the timeout, otherwise we do not get focus + setTimeout(() => this.inputBox.focus(), 0); let disposed = false; const toDispose: [lifecycle.IDisposable] = [this.inputBox, this];