Merge pull request #2072 from NguyenTranHoangSym/SDA-4441

SDA-4441: Restore focus on main after closing sub Windows
This commit is contained in:
NguyenTranHoangSym 2024-01-11 16:59:35 +07:00 committed by GitHub
commit d5647f0170
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -643,6 +643,8 @@ export class WindowHandler {
// workaround for https://perzoinc.atlassian.net/browse/SDA-4251
this.mainWindow?.on('focus', () => {
const mainView = this.getMainView();
mainView?.webContents.focus();
if (
this.mainWindow &&
windowExists(this.mainWindow) &&