Fix webview not focusing when created (fix #71)
This commit is contained in:
parent
38eae5b72c
commit
8a222be7f7
1 changed files with 6 additions and 0 deletions
6
index.js
6
index.js
|
@ -403,6 +403,12 @@ const TabPrivate = {
|
||||||
|
|
||||||
this.webview.addEventListener("did-finish-load", tabWebviewDidFinishLoadHandler.bind(this), false);
|
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);
|
this.webview.classList.add(this.tabGroup.options.viewClass);
|
||||||
if (this.webviewAttributes) {
|
if (this.webviewAttributes) {
|
||||||
let attrs = this.webviewAttributes;
|
let attrs = this.webviewAttributes;
|
||||||
|
|
Loading…
Reference in a new issue