Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

Remove hover keyboard shortcuts

Tim Wilson2abd88de3d6f
diff --git a/apps/web/ui/links/link-controls.tsx b/apps/web/ui/links/link-controls.tsx
index 71863a6e6e..e7b2e82ed2 100644
--- a/apps/web/ui/links/link-controls.tsx
+++ b/apps/web/ui/links/link-controls.tsx
@@ -4,7 +4,6 @@ import { useDeleteLinkModal } from "@/ui/modals/delete-link-modal";
import { useLinkQRModal } from "@/ui/modals/link-qr-modal";
import {
Button,
- CardList,
IconMenu,
PenWriting,
Popover,
@@ -24,8 +23,6 @@ import { LinksListContext, ResponseLink } from "./links-container";
export function LinkControls({ link }: { link: ResponseLink }) {
const { slug } = useParams() as { slug?: string };
- const { hovered } = useContext(CardList.Card.Context);
-
const { openMenuLinkId, setOpenMenuLinkId } = useContext(LinksListContext);
const openPopover = openMenuLinkId === link.id;
const setOpenPopover = (open: boolean) => {
@@ -82,10 +79,7 @@ export function LinkControls({ link }: { link: ResponseLink }) {
// only run shortcut logic if:
// - the 3 dots menu is open or the link card is hovered
// - the key pressed is one of the shortcuts
- if (
- (openPopover || (openMenuLinkId === null && hovered)) &&
- ["e", "d", "q", "a", "t", "i", "x"].includes(key)
- ) {
+ if (openPopover && ["e", "d", "q", "a", "t", "i", "x"].includes(key)) {
e.preventDefault();
setOpenPopover(false);
switch (key) {