Support @touchmove.passive.false
#4403
hirasso
started this conversation in
3. Feature Ideas
Replies: 1 comment 3 replies
-
For the scrolling thing, you can also use the CSS property |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi there!
TIL I learned that the
touchmove
event is passive by default. In some cases, it's necessary to explicitly make a touchmove event non-passive, to be able to later callpreventDefault()
on it. (For example to prevent vertical scrolling when scrolling a slider...looking at you, iOS Safari 😄)Currently, there is a way to tell
x-on
to make an event handler passive (related merged PR: #619).The implementation looks for a
passive
modifier and simply sets{passive: true}
if it finds one.I propose to expand on the current behavior like so:
So it would be possible to do all of these:
.passive
and.passive.true
makes a handler passive explicitely.passive.false
makes the handler non passiveHappy to create a PR if you accept any.
Beta Was this translation helpful? Give feedback.
All reactions