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

Add disablePassive modifier for start and moving events #75

Merged
merged 2 commits into from
Aug 17, 2020

Conversation

keaton-codes-tech
Copy link
Contributor

Allows use of a modifier in the v-touch directive for start and moving events to send the option { passive: false } on event listener creation.

Example in template:
<div v-touch:moving.disablePassive="movingHandler" > </div>

Example in script:
methods: { movingHandler (event) { event.preventDefault() } }

preventDefault() works when disablePassive modifier is used as specified in event listener options: https://developer.mozilla.org/en-US/docs/Web/API/EventTarget/addEventListener

oldbootz added 2 commits August 17, 2020 13:30
Add disablePassive modifier for start and moving events
@jerrybendy jerrybendy merged commit 3335bd5 into jerrybendy:master Aug 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants