SDA-3516 - Focus main web contents on restore (#1309)

This commit is contained in:
Kiran Niranjan 2021-12-30 14:29:22 +05:30 committed by GitHub
parent f0c2a6bfe1
commit 3cbd7dbf2c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -108,6 +108,10 @@ const throttledWindowChanges = throttle(async (eventName) => {
const throttledWindowRestore = throttle(async () => {
notification.moveNotificationToTop();
const mainWebContents = windowHandler.getMainWebContents();
if (mainWebContents && !mainWebContents.isDestroyed()) {
mainWebContents.focus();
}
}, 1000);
/**