Skip to content

fix(card): replaced the time-based click detection with a distance-based approach #5521

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Jun 11, 2025
Merged
4 changes: 2 additions & 2 deletions packages/card/src/Card.ts
Original file line number Diff line number Diff line change
Expand Up @@ -198,13 +198,13 @@ export class Card extends LikeAnchor(
);
if (hasAnchor) return;
// Record the time and initial position of the pointerdown event
const startTime = +new Date();
const startTime = event.timeStamp;
const startX = event.clientX;
const startY = event.clientY;

// Define the handler for when the pointer interaction ends
const handleEnd = (endEvent: PointerEvent): void => {
const endTime = +new Date();
const endTime = event.timeStamp;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

endEvent.timeStamp

const endX = endEvent.clientX;
const endY = endEvent.clientY;

Expand Down
Loading