Explicit focus webview on macOS alone.

This commit is contained in:
Zhongyi Tong
2017-08-02 02:23:35 +08:00
parent 4445baafa9
commit 3ad73a1eaa
2 changed files with 2 additions and 1 deletions

View File

@@ -57,6 +57,7 @@ function createMainWindow() {
icon: iconPath(),
minWidth: 600,
minHeight: 500,
titleBarStyle: 'hidden',
webPreferences: {
plugins: true,
allowDisplayingInsecureContent: true,

View File

@@ -104,7 +104,7 @@ class WebView extends BaseComponent {
// The bug is introduced from Electron and this is a tempory fix.
// See https://github.com/zulip/zulip-electron/issues/216
const osName = SystemUtil.getOS();
if (osName === 'Mac' || osName === 'Linux') {
if (osName === 'Mac') {
this.$el.focus();
}
}