From 7937d8d7208714fbefc3f68baa151ae4e43910db Mon Sep 17 00:00:00 2001 From: TheGoddessInari Date: Mon, 29 Apr 2019 09:27:06 -0700 Subject: [PATCH] Explicitly focus the BrowserWindow after showing. Workaround for electron/electron#18034 Fixes #92. --- app/ux/WebView.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/ux/WebView.js b/app/ux/WebView.js index 9e17a59f..50f2908d 100644 --- a/app/ux/WebView.js +++ b/app/ux/WebView.js @@ -551,7 +551,9 @@ Ext.define('Rambox.ux.WebView',{ } function showWindowAndActivateTab(event) { - require('electron').remote.getCurrentWindow().show(); + const currentWindow = require('electron').remote.getCurrentWindow(); + currentWindow.show(); + currentWindow.focus(); const tabPanel = Ext.cq1('app-main'); tabPanel.getActiveTab().blur(); tabPanel.setActiveTab(me);