diff options
author | Rob Lourens <roblourens@gmail.com> | 2022-06-08 00:17:48 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-08 00:17:48 +0300 |
commit | 0dfe96e423ce3b26e5499ce03af7b7f86ac8d6fe (patch) | |
tree | 8ea0edab24acc29c70d48d7359cc25729f4c2bc5 /src/vs | |
parent | da6e512e1333a3e96a8f9a217ae184fa7db759d4 (diff) |
Keep webview from stealing focus from save dialog (#151391)
Keep webview from stealing focus from save dialog.
Not sure why this timeout was needed two years ago, but the behavior is the same now. The behavior is not perfect anyway.
Fixes #151390
Diffstat (limited to 'src/vs')
-rw-r--r-- | src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts b/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts index e3e541e1d9f..29537af1c02 100644 --- a/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts +++ b/src/vs/workbench/contrib/notebook/browser/view/renderers/backLayerWebView.ts @@ -1336,12 +1336,10 @@ var requirejs = (function() { this.webview?.focus(); } - setTimeout(() => { // Need this, or focus decoration is not shown. No clue. - this._sendMessageToWebview({ - type: 'focus-output', - cellId, - }); - }, 50); + this._sendMessageToWebview({ + type: 'focus-output', + cellId, + }); } async find(query: string, options: { wholeWord?: boolean; caseSensitive?: boolean; includeMarkup: boolean; includeOutput: boolean }): Promise<IFindMatch[]> { |