FlowFuse / node-red-dashboard

https://dashboard.flowfuse.com
Apache License 2.0
207 stars 50 forks source link

added additional pointercancel eventlistener #1487

Open JulianStremel opened 6 days ago

JulianStremel commented 6 days ago

Description

I just wanted to make pointerevents more reliably end for hmi applications. So i added the pointercancel event to the button component that activates if the "pointerup" function is enabled. This will fire when closing the window while a button is pressed or other navigation changes happen that would otherwise not fire the "pointerup" event.

Related Issue(s)

No related issue

Checklist

JulianStremel commented 6 days ago

If we are to include this, i suggest we have a "memory"

Sounds reasonable ! I will have a second look at it shortly.

JulianStremel commented 6 days ago

@Steve-Mcl after some initial testing i couldnt figure cases out in which a "random" pointercancel would be emitet. I think due to pointercancel beeing a pointerevent it always cancels the active pointer on the pointerdowned element because it obviously needs a pointer to cancel on ... or is my understanding fundamentally wrong ?

Steve-Mcl commented 6 days ago

TBH, I dont know (not played with this event before - just regurgitating what I seen on MDN)

When I get time to pull and test, I will know more.

If however in the meantime you decide to play around some more and find it is not necessary, then thats fine too.