webview: Remove did-navigate workaround

The Electron bug seems to have been fixed upstream.  Meanwhile, the
workaround had been causing the app to hang if it can’t connect to an
organization at startup.

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg
2023-02-06 18:47:14 -08:00
committed by Anders Kaseorg
parent 5a571d66d0
commit 24de7ebb97

View File

@@ -56,11 +56,9 @@ export default class WebView {
) as HTMLElement;
props.$root.append($element);
// Wait for did-navigate rather than did-attach to work around
// https://github.com/electron/electron/issues/31918
await new Promise<void>((resolve) => {
$element.addEventListener(
"did-navigate",
"did-attach",
() => {
resolve();
},