Home

touchend

Touchend is a DOM event in the Touch Events API that fires when one or more touch points are removed from the touch surface, typically signaling the end of a touch sequence. It is delivered to the element that received the corresponding touchstart or to its ancestors if the event bubbles.

The event object for a touchend is a TouchEvent. For touchend, the changedTouches list contains the touch

Common usage involves recognizing taps, swipes, or other gestures by examining the coordinates and timing of

Compatibility and alternatives: touchend is part of the legacy Touch Events API and is widely supported on

points
that
have
just
ended,
while
the
touches
list
contains
any
remaining
touch
points
still
in
contact,
and
targetTouches
contains
touch
points
that
started
on
the
same
target
element.
In
a
multi‑touch
interaction,
a
separate
touchend
event
may
fire
for
each
finger
as
it
is
lifted,
and
the
sequence
generally
ends
when
the
last
finger
is
lifted.
the
ending
touch.
For
example,
you
can
read
the
clientX
and
clientY
properties
from
a
touch
in
e.changedTouches
to
determine
where
the
touch
ended,
and
use
it
in
combination
with
the
starting
touch
to
infer
a
gesture.
mobile
browsers.
Modern
web
development
often
uses
the
Pointer
Events
API,
which
unifies
mouse,
touch,
and
pen
input
and
can
simplify
gesture
handling.
Developers
should
consider
progressive
enhancement
and
provide
fallbacks
for
environments
without
touch
support.
When
using
touch
events,
be
mindful
of
default
scrolling
behavior
and
related
event
handling,
such
as
preventing
unwanted
gestures
where
appropriate.