08-07-2018 19:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-07-2018 19:58
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi everyone,
I'm trying to implement a "long press" (tap to do one thing, press and hold to put the watch into a different mode), but I'm running into an odd problem, at least with the simulator: if I click and hold, a mouseup event occurs about 500ms after the mousedown event, even if I don't release the mouse.
Here's the code I've added to the digital clock starter project:
// Event logging. let mouseDownTime = null; myLabel.onmousedown = () => { mouseDownTime = new Date(); console.log ("mousedown at " + mouseDownTime.getTime()); }; myLabel.onmouseup = () => { let now = new Date(); console.log ("mouseup at " + now.getTime() + " elapsed " + (now.getTime() - mouseDownTime.getTime())) };
A normal click and release produces the results you'd expect:
08-21-2018 13:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


08-21-2018 13:42
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Dear Fitbit, could you please add a fix for this bug to your do-to list? Thanks!
Gondwana Software

08-28-2018 12:41 - edited 08-28-2018 21:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

08-28-2018 12:41 - edited 08-28-2018 21:32
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Wrong Post.

