12-31-2017 12:12
12-31-2017 12:12
It seems to me that onmouseup() is fired shortly after onmousedown() even if one's finger remains on the screen (as though the event is emulating a simple click). After onmouseup(), onmousemove() events can continue to occur, which shouldn't happen on a touch-screen device.
This makes drag-and-drop or swipe gestures rather kludgy to implement. It would be useful if onmouseup() fired when one's finger was uplifted.
The relevant documentation is here.
Answered! Go to the Best Answer.
01-13-2018 19:33
01-13-2018 19:33
That's a workaround I use. It's pretty crappy but it sort of works. There is definitely a bug in the onmouseup and onmousedown Touch Events where both fire simultaneously regardless of which way you swipe. Hopefully that gets fixed soon.
01-13-2018 19:33
01-13-2018 19:33
var y = 0;
scrollableArea.onmousemove = function(evt) {
if (evt.screenY < y) {
doDownAction();
}
else if (evt.screenY > y) {
doUpAction();
}
y = evt.screenY;
}
01-13-2018 19:33
01-13-2018 19:33
That's a workaround I use. It's pretty crappy but it sort of works. There is definitely a bug in the onmouseup and onmousedown Touch Events where both fire simultaneously regardless of which way you swipe. Hopefully that gets fixed soon.
01-13-2018 20:01
01-13-2018 20:01
Thanks for the confirmation. For my purposes, I had to use a timeout to see when onmousemove() events stopped happening. This means reduced responsiveness.
Your solution would avoid such unresponsiveness.
01-29-2019 12:46
01-29-2019 12:46
Have the same issue and no workaround (so far). I need to kick off setInterval while screen is pressed and clear the interval when it's no longer pressed. Basic stuff, really annoying that it doesn't work
01-29-2019 13:51
01-29-2019 13:51
From discord:
"orviwan (JonFitbit):something weird, if the rect is fullscreen, there are certain parts where you can touch and the mouseup doesn't trigger immediately, other parts it does"
Orviwan has submitted an official bug report.
03-02-2019 20:47
03-02-2019 20:47
Thanks for posting!
Thought I was doing something wrong till I found this posting. 🙂
07-09-2019 06:57
07-09-2019 06:57
Another workaround is to simply use the onClick event in place of the onMouseUp event since in this context they are equivalent.
07-09-2019 10:35
07-09-2019 10:35
The next firmware update will have a fix for this issue, and no, I don't have a specific release date yet.