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

Touch End Hold Directive #17318

Open
zN3utr4l opened this issue Jun 24, 2024 · 3 comments
Open

Touch End Hold Directive #17318

zN3utr4l opened this issue Jun 24, 2024 · 3 comments
Labels

Comments

@zN3utr4l
Copy link

What happened?

I wanted to create a component that when I press it changes a variable to true and when I lift the touch or click it changes that variable back to false.

I found this issue that says to add the events directly (#3876), but in this file (

) I saw that events are supported, but there are some problems with touch, the mouse works, both up and down, while the touchend doesn't is triggered.

What did you expect to happen?

touch end when I release the button click

Reproduction URL

https://codepen.io/zN3utral/pen/bGyMXjK?editors=111

How to reproduce?

Touch event on button

Flavour

Quasar CLI with Vite (@quasar/cli | @quasar/app-vite)

Areas

Components (quasar), Directives (quasar)

Platforms/Browsers

Chrome

Quasar info output

No response

Relevant log output

No response

Additional context

No response

@zN3utr4l
Copy link
Author

I found some more information, before executing the function in v-touch-hold the touchend is triggered, but once the function is executed it no longer works

@zN3utr4l
Copy link
Author

For the moment I bypassed the error with:

@touchstart="() => writeValue('toggle', true)"
@mousedown="() => writeValue('toggle', true)"
@touchend="() => writeValue('toggle', false)"
@mouseup="() => writeValue('toggle', false)"

@zN3utr4l
Copy link
Author

zN3utr4l commented Jul 3, 2024

evt !== void 0 && stopAndPrevent(evt)

Could this be the problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant