Button - Added additional pointercancel eventlistener
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
- [x] No further modifications and updates needed
If we are to include this, i suggest we have a "memory"
Sounds reasonable ! I will have a second look at it shortly.
@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 ?
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.
I will have a second look at it shortly.
Have you had the chance to add in the memory proposed by Steve? I think it would be a good catch just in case there are occasions we've not considered where this could mis-fire
@JulianStremel just checking you've seen the above
@JulianStremel just checking you've seen the above
Sorry for the long silence i had to shift focus to some other projects for the last couple of weeks.
I tested a "memory" implementation and that works like expected... but the pointercancel event as described by the mdn docs only ever fires for active pointers so also tracking active pointers would be double the work for no logical reason im my mind.