Skip to content

Commit

Permalink
feat(link): disable long press behavior in ios
Browse files Browse the repository at this point in the history
  • Loading branch information
tonyfromundefined committed Nov 7, 2024
1 parent bc32f3b commit b032b8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion extensions/link/src/future/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,13 @@ export function Link<K extends RegisteredActivityName>(props: LinkProps<K>) {
};

return (
<a ref={props.ref} href={href} onClick={onClick} {...anchorProps}>
<a
ref={props.ref}
href={href}
onClick={onClick}
draggable="false" // Disable long press behavior by default in iOS
{...anchorProps}
>
{props.children}
</a>
);
Expand Down
1 change: 1 addition & 0 deletions extensions/link/src/stable/Link.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ export const Link: TypeLink = forwardRef(
ref={mergeRefs(ref, anchorRef)}
href={href}
onClick={onClick}
draggable="false" // Disable long press behavior by default in iOS
{...anchorProps}
>
{props.children}
Expand Down

0 comments on commit b032b8a

Please sign in to comment.