Skip to content

Commit

Permalink
fix: search box sometimes doesn't show on startup
Browse files Browse the repository at this point in the history
  • Loading branch information
sentialx committed Oct 1, 2019
1 parent c36ef90 commit 145cf16
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/main/dialogs/dialog.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ export class Dialog extends BrowserView {

clearTimeout(this.timeout);

this.rearrange();
this.bringToTop();
this.rearrange();

if (focus) this.webContents.focus();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/sessions-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export class SessionsManager {
context.loadExtension(resolve(extensionsPath, dir));
}

context.loadExtension(resolve(__dirname, 'extensions/wexond-darkreader'));
// context.loadExtension(resolve(__dirname, 'extensions/wexond-darkreader'));

if (session === 'incognito') {
this.incognitoExtensionsLoaded = true;
Expand Down
1 change: 1 addition & 0 deletions src/main/view-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export class ViewManager {

this.window.menuDialog.hide();
this.window.findDialog.hide();

this.window.searchDialog.bringToTop();

this.fixBounds();
Expand Down
6 changes: 1 addition & 5 deletions src/renderer/views/search/store/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class Store {
public suggestions = new SuggestionsStore(this);

@observable
public visible = true;
public visible = false;

@observable
public history: IHistoryItem[] = [];
Expand Down Expand Up @@ -117,10 +117,6 @@ export class Store {
this.loadHistory();
this.loadFavicons();

setTimeout(() => {
this.visible = false;
});

window.addEventListener('blur', () => {
if (this.visible) {
ipcRenderer.send(`hide-${this.id}`);
Expand Down

0 comments on commit 145cf16

Please sign in to comment.