08-01-2021 10:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-01-2021 10:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello, I'm trying to read when an element is held (instead of clicked). Something similar to
myElement.addEventListener("click", () => {
console.log('I am clicked');
});
But with a hold event instead. I tried
myElement.addEventListener("hold", () => {
console.log('I am held');
});
But I'm assuming 'hold' isn't an actual event name. Can someone help me out? Thanks!

08-01-2021 13:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-01-2021 13:40
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You can fudge this using "mouse" events and keeping track of time for screen touches. Even then, it doesn't work well with clockfaces because the system now uses a long-touch to start the Clocks app. For a clockface, you might be better trying to implement a double-tap (again using time).
Gondwana Software
08-01-2021 19:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-01-2021 19:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I'm developing an app thankfully. But yeah, I came across that as a solution, but was hoping something better was out there.
Hey Fitbit Devs: Can this be added to a future sdk release? Is it in the works?

08-04-2021 19:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-04-2021 19:50
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
You can use this node module and see if it works. I haven't tested this module out so if you have an an issue with this then leave an issue on the respiratory here.
If this answer works please mark this post as a Best Answer. ~ K.K Designs

