From c11bbbb2b39a6764b3359520337c06f34c95c41b Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sat, 25 May 2024 13:52:25 +0800 Subject: [PATCH] Handle modifiers when clicking on account links --- src/components/name-text.jsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/name-text.jsx b/src/components/name-text.jsx index 8732ed57..c60f619c 100644 --- a/src/components/name-text.jsx +++ b/src/components/name-text.jsx @@ -57,9 +57,15 @@ function NameText({ } onClick={(e) => { if (external) return; + if (e.shiftKey) return; // Save link? 🤷‍♂️ e.preventDefault(); e.stopPropagation(); if (onClick) return onClick(e); + if (e.metaKey || e.ctrlKey || e.shiftKey || e.which === 2) { + const internalURL = `#/${instance}/a/${id}`; + window.open(internalURL, '_blank'); + return; + } states.showAccount = { account, instance,