-
Notifications
You must be signed in to change notification settings - Fork 357
[#2142] touch events handling #3150
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
base: develop
Are you sure you want to change the base?
Conversation
# Conflicts: # packages/docs/locales/en.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
touch fn too complicated because it uses useEvent inside. Must be reworked.
@@ -0,0 +1,88 @@ | |||
import { ref, onBeforeUnmount, type Ref } from 'vue' | |||
|
|||
import { useEvent, useWindow } from './' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Prefer direct import by path to prevent circular dependecies...
|
||
const cancelTouch = () => { | ||
clearTouchTimeouts() | ||
removeTouchCancelListeners() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
useEvent must be used outside of onTouchStart function and there will no be needed to add removeTouchCancelListeners...
Closes: #2142
Description
useTouch
composable implementation;VaDropdown
;useEvent
composable improvement;Types of changes