Fix webview not focusing when created (fix #71)

This commit is contained in:
Thomas Brouard 2020-02-04 12:07:21 +01:00
parent 38eae5b72c
commit 8a222be7f7

View file

@ -403,6 +403,12 @@ const TabPrivate = {
this.webview.addEventListener("did-finish-load", tabWebviewDidFinishLoadHandler.bind(this), false);
this.webview.addEventListener("dom-ready", function () {
// Remove this once https://github.com/electron/electron/issues/14474 is fixed
tab.webview.blur();
tab.webview.focus();
});
this.webview.classList.add(this.tabGroup.options.viewClass);
if (this.webviewAttributes) {
let attrs = this.webviewAttributes;