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

add dragThreshold prop to A11y component #38

Merged
merged 1 commit into from
Apr 2, 2022
Merged

add dragThreshold prop to A11y component #38

merged 1 commit into from
Apr 2, 2022

Conversation

claytercek
Copy link
Contributor

Adds an optional dragThreshold prop to the A11y component. If the onClick event delta is greater than this value, the action event handler doesn't fire.

I've run into an issue using this library in combination with the drei MapControls, where drags that start and end on the same A11y target trigger a click event when the user's intention is to just pan the camera.

@codesandbox-ci
Copy link

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 976a906:

Sandbox Source
MR_main_a11y_features_test Configuration

@AlaricBaraou
Copy link
Collaborator

Hello @claytercek ,
I've never seen this .delta property on click event, can you share where it's coming from ?
Otherwise I'm fine with the logic of this PR

@claytercek
Copy link
Contributor Author

@AlaricBaraou AlaricBaraou merged commit 8f77f26 into pmndrs:main Apr 2, 2022
@claytercek claytercek deleted the drag-threshold branch April 4, 2022 13:55
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.

None yet

2 participants