mirror of
https://github.com/zulip/zulip-desktop.git
synced 2025-11-05 06:23:14 +00:00
focus webview after loading
This commit is contained in:
@@ -30,12 +30,10 @@ class ServerManagerView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
initTabs() {
|
initTabs() {
|
||||||
this.badgeNumberList = [];
|
|
||||||
const servers = this.domainUtil.getDomains();
|
const servers = this.domainUtil.getDomains();
|
||||||
if (servers.length > 0) {
|
if (servers.length > 0) {
|
||||||
for (const server of servers) {
|
for (const server of servers) {
|
||||||
this.initTab(server);
|
this.initTab(server);
|
||||||
this.badgeNumberList.push(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.activateTab(0);
|
this.activateTab(0);
|
||||||
@@ -79,6 +77,10 @@ class ServerManagerView {
|
|||||||
// We need to wait until the page title is ready to get badge count
|
// We need to wait until the page title is ready to get badge count
|
||||||
setTimeout(() => this.updateBadge(index), 1000);
|
setTimeout(() => this.updateBadge(index), 1000);
|
||||||
});
|
});
|
||||||
|
$webView.addEventListener('dom-ready', () => {
|
||||||
|
$webView.focus()
|
||||||
|
});
|
||||||
|
|
||||||
this.registerListeners($webView, index);
|
this.registerListeners($webView, index);
|
||||||
this.zoomFactors[index] = 1;
|
this.zoomFactors[index] = 1;
|
||||||
}
|
}
|
||||||
@@ -94,6 +96,7 @@ class ServerManagerView {
|
|||||||
} else {
|
} else {
|
||||||
this.updateBadge(index);
|
this.updateBadge(index);
|
||||||
$webView.classList.remove('disabled');
|
$webView.classList.remove('disabled');
|
||||||
|
$webView.focus()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user