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:

Nx Adoption Guide: Overview, Examples, And Alternatives

Nx adoption guide: Overview, examples, and alternatives

Let’s explore Nx features, use cases, alternatives, and more to help you assess whether it’s the right tool for your needs.

Andrew Evans
Mar 28, 2024 ⋅ 9 min read
Understanding Security In React Native Applications

Understanding security in React Native applications

Explore the various security threats facing React Native mobile applications and how to mitigate them.

Wisdom Ekpotu
Mar 27, 2024 ⋅ 10 min read
Warp Adoption Guide: Overview, Examples, And Alternatives

warp adoption guide: Overview, examples, and alternatives

The warp web framework for Rust offers many enticing features. Let’s see when and why you should consider using warp in your projects.

Ukeje Goodness
Mar 26, 2024 ⋅ 8 min read
Integrating Next Js And Signalr For Enhanced Real Time Web App Capabilities

Integrating Next.js and SignalR to build real-time web apps

In this tutorial, you’ll learn how to integrate Next.js and SignalR to build an enhanced real-time web application.

Clara Ekekenta
Mar 25, 2024 ⋅ 8 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