Long Press
Long Press
A robust, cross-platform Svelte action for handling long-press gestures with built-in move tolerance.
- Pointer Events: Uses modern pointer events, ensuring identical behavior across mouse, touch, and pen devices.
- Move Tolerance: Cancels the press if the pointer moves more than 8 pixels, preventing accidental triggers while scrolling.
- Context Menu Prevention: Intelligently handles default context menu suppression so your custom actions don't clash with system UI.
- Zero Dependencies: Tiny footprint (under 100 lines of code) with no external gesture library required.