Archived
1
0

Fix markdown preview focus (#546)

* Fix hash

* Remove whitespace
This commit is contained in:
John McCambridge 2019-04-23 19:14:52 -05:00 committed by Asher
parent 6b887dcc9c
commit 30b8565e2d

View File

@ -827,7 +827,7 @@ index 780147c..2e8c9af 100644
- if (platform.isMacintosh) {
+ if (browser.isMacintosh) {
diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js b/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
index 74fc798..03728d0 100644
index 74fc798..0b6b5eb 100644
--- a/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
+++ b/src/vs/workbench/contrib/webview/electron-browser/webview-pre.js
@@ -10 +10,19 @@
@ -866,6 +866,11 @@ index 74fc798..03728d0 100644
+ // supportFetchAPI: true,
+ // corsEnabled: true
+ // });
@@ -328 +346,3 @@
- newFrame.contentWindow.focus();
+ if (document.hasFocus()) {
+ newFrame.contentWindow.focus();
+ }
diff --git a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts b/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts
index 484ff86..f3f57cb 100644
--- a/src/vs/workbench/contrib/webview/electron-browser/webview.contribution.ts