Skip to content

Commit

Permalink
FIX: Rewrite prevent default
Browse files Browse the repository at this point in the history
  • Loading branch information
snaildos committed Nov 6, 2023
1 parent 1117815 commit 9c89e70
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Binary file modified .yarn/install-state.gz
Binary file not shown.
8 changes: 4 additions & 4 deletions src/main/view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,24 +200,24 @@ export class View {
async (e, url, frameName, disposition) => {
if (disposition === 'new-window') {
if (frameName === '_self') {
e.preventDefault();
await this.window.viewManager.selected.webContents.loadURL(url);
return { action: "deny" };
} else if (frameName === '_blank') {
e.preventDefault();
this.window.viewManager.create(
{
url,
active: true,
},
true,
);
return { action: "deny" };
}
} else if (disposition === 'foreground-tab') {
e.preventDefault();
this.window.viewManager.create({ url, active: true }, true);
return { action: "deny" };
} else if (disposition === 'background-tab') {
e.preventDefault();
this.window.viewManager.create({ url, active: true }, true);
return { action: "deny" };
}
},
);
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/views/history/components/App/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export default observer(() => {
</NavigationDrawer.Item>
<p>
Keep in mind, This button only clears search history, not favicons
nor suggestions. Please go to settings for advance clear features.
nor suggestions. Please go to settings for advanced clear features.
</p>
</NavigationDrawer>
<Content onScroll={onScroll}>
Expand Down

0 comments on commit 9c89e70

Please sign in to comment.