Files
headlessui/playgrounds
Robin Malfait 03c22b42b6 Cancel outside click behavior on touch devices when scrolling (#3266)
* make `handleOutsideClick` stable

* cancel "outside click" when "scrolling" on touch device

When on a touch device, then the `touchend` event will fire, even if you
scrolled a bit and scrolling was your intention.

This now tracks that touches were at least 30px apart in either the X or
Y direction. If that's the case, then we do not consider it an outside
click.

* add `enabled` parameter to `useDocumentEvent` and `useWindowEvent`

* update `useDocumentEvent` and `useWindowEvent` usages

This now takes the new `enabled` value into account.

* update changelog

* bump vue and vite in playground
2024-06-03 16:18:14 +02:00
..