-
Notifications
You must be signed in to change notification settings - Fork 147
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 swipe events to document. #180
Comments
@chapster11 I like this idea a lot! It definitely has some overlap and carries some of the same concerns issues with #167 , #170 , #179 . We need to figure out our approach for "passive event options" for v6. But we could attempt to implement this for I really like how We additionally have a helper that could be modified/updated to incorporate this prop for both touch and mouse handlers. Lines 138 to 146 in 939ee9f
|
I have this library working on the const { ref } = useSwipeable({
...
}) as { ref: RefCallback<Document> };
useEffect(() => {
ref(document);
}); Kind of hacky, but is working so far! |
I like the above solution. It works and doesn't require an overhaul to |
I've been using the package and like it a lot. I was wondering if I'm missing anything in regards to been able to set the swipe events only on elements and not on a document. Or is it possible to add swipe events to document ?
I read through some of the closed tickets and saw #150 ticket which touches on the topic of using an element to detect the swipe from left but the problem is the element is above the content which prevents the content below it from been selectable. By setting the event on document would allow for editable content.
The question was asked but not really answered in #150.
I can add my own event document.addEventListener('touchmove', touchMoveHandler)
but to save time I'd like to use this package if this is possible to have the events used on document as well as elements.
The text was updated successfully, but these errors were encountered: