diff --git a/src/main/dialogs/dialog.ts b/src/main/dialogs/dialog.ts index 81508fc3d..4f9c8ae31 100644 --- a/src/main/dialogs/dialog.ts +++ b/src/main/dialogs/dialog.ts @@ -91,9 +91,7 @@ export class Dialog extends BrowserView { clearTimeout(this.timeout); this.rearrange(); - - this.appWindow.removeBrowserView(this); - this.appWindow.addBrowserView(this); + this.bringToTop(); if (focus) this.webContents.focus(); } @@ -108,8 +106,7 @@ export class Dialog extends BrowserView { } public hide() { - this.appWindow.removeBrowserView(this); - this.appWindow.addBrowserView(this); + this.bringToTop(); clearTimeout(this.timeout); @@ -121,4 +118,9 @@ export class Dialog extends BrowserView { this.visible = false; } + + public bringToTop() { + this.appWindow.removeBrowserView(this); + this.appWindow.addBrowserView(this); + } } diff --git a/src/main/view-manager.ts b/src/main/view-manager.ts index 2016f202e..b5d92dedb 100644 --- a/src/main/view-manager.ts +++ b/src/main/view-manager.ts @@ -164,10 +164,7 @@ export class ViewManager { this.window.menuDialog.hide(); this.window.findDialog.hide(); - - if (!view.webContents.getURL().startsWith(NEWTAB_URL)) { - this.window.searchDialog.hide(); - } + this.window.searchDialog.bringToTop(); this.fixBounds(); }