From 981a8e93ba106f4f7b38d503bd8b77c1afd230d8 Mon Sep 17 00:00:00 2001 From: Prateek Shourya Date: Tue, 25 Jun 2024 12:32:51 +0530 Subject: [PATCH] [WEB-1691] fix: update `ControlLink` default target to `_blank` to avoid unwanted N-progress trigger. (#4927) --- packages/ui/src/control-link/control-link.tsx | 2 +- web/core/components/core/list/list-item.tsx | 2 +- web/core/components/inbox/content/inbox-issue-header.tsx | 1 + web/core/components/inbox/content/issue-properties.tsx | 1 + .../components/issues/issue-layouts/calendar/issue-block.tsx | 1 - web/core/components/issues/issue-layouts/gantt/blocks.tsx | 1 - web/core/components/issues/issue-layouts/kanban/block.tsx | 1 - web/core/components/issues/issue-layouts/list/block.tsx | 3 +-- .../components/issues/issue-layouts/spreadsheet/issue-row.tsx | 1 - web/core/components/issues/sub-issues/issue-list-item.tsx | 1 - 10 files changed, 5 insertions(+), 9 deletions(-) diff --git a/packages/ui/src/control-link/control-link.tsx b/packages/ui/src/control-link/control-link.tsx index 83f3157cc..83c719ca1 100644 --- a/packages/ui/src/control-link/control-link.tsx +++ b/packages/ui/src/control-link/control-link.tsx @@ -11,7 +11,7 @@ export type TControlLink = React.AnchorHTMLAttributes & { }; export const ControlLink = React.forwardRef((props, ref) => { - const { href, onClick, children, target = "_self", disabled = false, className, draggable = false, ...rest } = props; + const { href, onClick, children, target = "_blank", disabled = false, className, draggable = false, ...rest } = props; const LEFT_CLICK_EVENT_CODE = 0; const handleOnClick = (event: React.MouseEvent) => { diff --git a/web/core/components/core/list/list-item.tsx b/web/core/components/core/list/list-item.tsx index 1e5a1327a..894f488e2 100644 --- a/web/core/components/core/list/list-item.tsx +++ b/web/core/components/core/list/list-item.tsx @@ -45,7 +45,7 @@ export const ListItem: FC = (props) => { return (
- +
= observer((p onClick={() => router.push(`/${workspaceSlug}/projects/${issue?.project_id}/issues/${currentInboxIssueId}`) } + target="_self" >