Skip to content

Commit

Permalink
fix: task links not opening in new windows
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed May 1, 2022
1 parent 04c7671 commit a32807f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions app/main/src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,11 @@ function createMainWindow() {
// Open the DevTools.
if (isDev) win.webContents.openDevTools({ mode: "detach" });

win.webContents.setWindowOpenHandler((details) => {
shell.openExternal(details.url);
return { action: "deny" };
});

win.loadURL(
!onProduction
? "http://localhost:3000"
Expand Down
1 change: 1 addition & 0 deletions app/renderer/src/routes/Tasks/TaskDetails/MDPreviewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const MDPreviewer: React.FC<Props> = ({ description, onClick }) => {
>
<ReactMarkdown
escapeHtml={false}
linkTarget={"_blank"}
source={
description ? description : "Add a more detailed description..."
}
Expand Down

0 comments on commit a32807f

Please sign in to comment.