Open
Description
Describe the bug
When using onLongPress
onLongPress( elementRef, () => { console.log("Long pressed"); }, { delay: 1000, distanceThreshold: 100 } // distanceThreshold: number | boolean | undefined );
Passing distanceThreshold
as 100
or false
does not give the room to wiggle around after long press has started on touch devices.
Reproduction
https://stackblitz.com/edit/vitejs-vite-pqjp5zzp?file=src%2FApp.vue
System Info
System:
OS: Windows 11 10.0.26100
CPU: (22) x64 Intel(R) Core(TM) Ultra 7 155H
Memory: 2.10 GB / 15.46 GB
Binaries:
Node: 20.16.0 - ~\AppData\Local\Volta\tools\image\node\20.16.0\node.EXE
Yarn: 4.2.2 - C:\Program Files\Volta\yarn.EXE
npm: 10.8.1 - ~\AppData\Local\Volta\tools\image\node\20.16.0\npm.CMD
Browsers:
Edge: Chromium (132.0.2957.127)
Internet Explorer: 11.0.26100.1882
Used Package Manager
yarn
Validations
- Follow our Code of Conduct
- Read the Contributing Guidelines.
- Read the docs.
- Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
- Make sure this is a VueUse issue and not a framework-specific issue. For example, if it's a Vue SFC related bug, it should likely be reported to https://github.com/vuejs/core instead.
- Check that this is a concrete bug. For Q&A open a GitHub Discussion.
- The provided reproduction is a minimal reproducible example of the bug.