8000 fix(onLongPress): honor `distanceThreshold` for touch devices by ssxv · Pull Request #4586 · vueuse/vueuse · GitHub
[go: up one dir, main page]

Skip to content

fix(onLongPress): honor distanceThreshold for touch devices #4586

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

Open
wants to merge 9 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
demo and directive event type TouchEvent
  • Loading branch information
ssxv committed Feb 16, 2025
commit 326b72ec766e666b381083a1092a95ee0e6e9e20
2 changes: 1 addition & 1 deletion packages/core/onLongPress/demo.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const htmlRefOnMouseUp = ref<HTMLElement | null>(null)
const longPressed = ref(false)
const clicked = ref(false)

function onLongPressCallback(e: PointerEvent) {
function onLongPressCallback(e: PointerEvent | TouchEvent) {
longPressed.value = true
}

Expand Down
2 changes: 1 addition & 1 deletion packages/core/onLongPress/directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import type { OnLongPressOptions } from './index'

import { onLongPress } from './index'

type BindingValueFunction = (evt: PointerEvent) => void
type BindingValueFunction = (evt: PointerEvent | TouchEvent) => void

type BindingValueArray = [
BindingValueFunction,
Expand Down
0