Skip to content

Commit

Permalink
fix: make tasks not edit when clicking contained links
Browse files Browse the repository at this point in the history
  • Loading branch information
sekwah41 committed May 1, 2022
1 parent a32807f commit 7b4de89
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion app/renderer/src/routes/Tasks/TaskDetails/MDPreviewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ const MDPreviewer: React.FC<Props> = ({ description, onClick }) => {
<StyledDescriptionPreviewer
className="md-previewer"
hasValue={description != null}
onClick={onClick}
onClick={(event) => {
// Because it doesn't seem to let you reffer to target as HTMLDivElement, only currentElement which is wrong
let target: any = event?.target;
if (onClick && target?.tagName !== "A") {
onClick(event);
}
}}
>
<ReactMarkdown
escapeHtml={false}
Expand Down

0 comments on commit 7b4de89

Please sign in to comment.