Skip to content
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

fix: drawer failing to cancel move event #339

Closed
wants to merge 5 commits into from

Conversation

rortan134
Copy link
Contributor

Closes #279

Copy link

vercel bot commented May 5, 2024

@rortan134 is attempting to deploy a commit to the emil Team on Vercel.

A member of the Team first needs to authorize it.


React.useEffect(() => {
// Trigger enter animation without using CSS animation
setVisible(true);
}, []);

const isDeltaInDirection = (delta: { x: number; y: number }, direction: DrawerDirection, threshold = 0) => {
function isDeltaInDirection(delta: { x: number; y: number }, direction: DrawerDirection, threshold = 0) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to regular function for the sake of consistency

src/index.tsx Outdated
Comment on lines 1051 to 1052
onPointerOut={handleOnPointerUp}
onContextMenu={handleOnPointerUp}
Copy link
Contributor

Choose a reason for hiding this comment

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

We need to forward the events to these too

@joaom00
Copy link
Contributor

joaom00 commented May 13, 2024

I think the events are not being forwarded yet. I'm talking specifically about this line

 rest.onPointerUp?.(event);

We need to

rest.onPointerOut?.(event)
rest.onContextMenu?.(event)

depending on the prop

@emilkowalski
Copy link
Owner

Added in #440 due to too many merge conflicts, it's my bad that I didn't merge this earlier. Thanks for your contribution though!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dialog thinks mouse is pressed when exiting context menu
3 participants