Skip to content

Commit 64ca984

Browse files
nol166code-asher
authored andcommitted
Fix markdown preview focus (#546)
* Fix hash * Remove whitespace
1 parent 5dc9fb4 commit 64ca984

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

scripts/vscode.patch

+6-1
Original file line numberDiff line numberDiff line change
@@ -827,7 +827,7 @@ index 780147c..2e8c9af 100644
827827
- if (platform.isMacintosh) {
828828
+ if (browser.isMacintosh) {
829829
diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js b/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
830-
index 74fc798..03728d0 100644
830+
index 74fc798..0b6b5eb 100644
831831
--- a/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
832832
+++ b/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
833833
@@ -10 +10,19 @@
@@ -866,6 +866,11 @@ index 74fc798..03728d0 100644
866866
+ // supportFetchAPI: true,
867867
+ // corsEnabled: true
868868
+ // });
869+
@@ -328 +346,3 @@
870+
- newFrame.contentWindow.focus();
871+
+ if (document.hasFocus()) {
872+
+ newFrame.contentWindow.focus();
873+
+ }
869874
diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts b/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts
870875
index 484ff86..f3f57cb 100644
871876
--- a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts

0 commit comments

Comments
 (0)