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:

Integrating Django Templates With React For Dynamic Webpages

Integrating Django templates with React for dynamic webpages

Create a dynamic demo blog site using Django and React to demonstrate Django’s server-side functionalities and React’s interactive UI.

Kayode Adeniyi
Apr 18, 2024 ⋅ 7 min read
Using Aoi Js To Build A Bot For Discord

Using aoi.js to build a bot on Discord

Explore how the aoi.js library makes it easy to create Discord bots with useful functionalities for frontend applications.

Rahul Padalkar
Apr 17, 2024 ⋅ 9 min read
Web Components Adoption Guide: Overview, Examples, And Alternatives

Web Components adoption guide: Overview, examples, and alternatives

Evaluate Web Components, a set of standards that allow you to create custom HTML tags for more reusable, manageable code.

Elijah Asaolu
Apr 16, 2024 ⋅ 11 min read
Using Aws Lambda And Aws Cloudfront To Optimize Image Handling

Using AWS Lambda and CloudFront to optimize image handling

Leverage services like AWS Lambda, CloudFront, and S3 to handle images more effectively, optimizing performance and providing a better UX.

Nitish Sharma
Apr 12, 2024 ⋅ 12 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