From b482e1e8b7794cefaf71a53ccc42b3c780f3e2cb Mon Sep 17 00:00:00 2001 From: Mathias Wagner Date: Fri, 2 Jun 2023 20:37:00 +0200 Subject: [PATCH] The PowerItem.jsx now supports a middle click --- .../SidebarContent/components/PowerItem/PowerItem.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/client/src/common/components/Sidebar/components/SidebarContent/components/PowerItem/PowerItem.jsx b/client/src/common/components/Sidebar/components/SidebarContent/components/PowerItem/PowerItem.jsx index 6550f4b..63bcfb6 100644 --- a/client/src/common/components/Sidebar/components/SidebarContent/components/PowerItem/PowerItem.jsx +++ b/client/src/common/components/Sidebar/components/SidebarContent/components/PowerItem/PowerItem.jsx @@ -6,8 +6,16 @@ export const PowerItem = ({icon, name, path}) => { const location = useLocation(); const navigate = useNavigate(); + const mouseDown = (event) => { + if (event.button === 1) { + event.preventDefault(); + window.open(window.location.origin + path, "_blank"); + } + } + return ( -
navigate(path)}> +
navigate(path)}>

{name}