2018-08-07
1345
#vue
Nosa Obaseki
374
Aug 7, 2018 ⋅ 4 min read

Building a long-press directive in Vue

Nosa Obaseki Front-end dev currently building amazing products @theflutterwave 🐼🇳🇬

Recent posts:

Using React Shepherd To Build A Site Tour

Using React Shepherd to build a site tour

React Shepherd stands out as a site tour library due to its elegant UI and out-of-the-box, easy-to-use React Context implementation.

Onuorah Bonaventure
May 1, 2024 ⋅ 14 min read
A Guide To Cookies In Next Js

A guide to cookies in Next.js

Cookies are crucial to web development. This article will explore how to handle cookies in your Next.js applications.

Georgey V B
Apr 30, 2024 ⋅ 10 min read
Handling Dates In JavaScript With Tempo

Handling dates in JavaScript with Tempo

Use the Tempo library to format dates and times in JavaScript while accounting for time zones, daylight saying time, and date internationalization.

Amazing Enyichi Agu
Apr 30, 2024 ⋅ 8 min read
A Guide To Deno.cron

A guide to Deno.cron

This guide explores how to use the cron package in Deno, `Deno.cron`, to handle scheduling tasks with specific commands.

Rosario De Chiara
Apr 29, 2024 ⋅ 5 min read
View all posts

5 Replies to "Building a long-press directive in Vue"

  1. Thanks for this well written post. I have a long-press button (a push-to-talk application that keeps the mic on only while the button is being held down) and it’s working fine, but one of the beta testers kept moving the mouse while holding it down so the mouse-up event often didn’t fire on the button itself but on a different component. Is that common and is there a workaround that could call a method on the longpress component even if the mouse-up occurs elsewhere on the page? (The component maintains its state so if it’s not in the “recording” state, that would be a no-op.)

  2. Thank you for the post. When I handle the longpress event, it is getting triggered continuously as soon as I launch the app. Any idea what I am missing?

Leave a Reply