From 857795e5038d5b2927ce9535748e49222403d565 Mon Sep 17 00:00:00 2001 From: Thomas Brouard Date: Wed, 19 Feb 2020 18:37:38 +0100 Subject: [PATCH] Fix #95 --- index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index 5a09f6f..f2c6bd5 100644 --- a/index.js +++ b/index.js @@ -395,7 +395,7 @@ const TabPrivate = { }, initWebview: function () { - this.webview = document.createElement("webview"); + const webview = this.webview = document.createElement("webview"); const tabWebviewDidFinishLoadHandler = function (e) { this.emit("webview-ready", this); @@ -405,8 +405,8 @@ const TabPrivate = { this.webview.addEventListener("dom-ready", function () { // Remove this once https://github.com/electron/electron/issues/14474 is fixed - tab.webview.blur(); - tab.webview.focus(); + webview.blur(); + webview.focus(); }); this.webview.classList.add(this.tabGroup.options.viewClass);