In an Canvas EventListener, the "mouseup" event does not fire if you move the mouse outside the region. This is problematic as if you have a timer which fires after a mousedown event, if the mouseup event never fires you may get an infinite timer.
Is there any way that the mousedown event can fire as soon as you release the mouse no matter where the mouse pointer is in relation to the object?
This probably isn't the most clear description of the issue, so I hope this test case will show it well:
Test case: copy this into the nasal console and execute:
https://pastebin.com/iKcwRTuq
This will launch a screen:

This will show the problem nicely. It will get stuck on like so, as the mouseup never fires.
Diff:
Yep, should be fixable. I don't think anyone has touched this code in a while, however. Will see how easy./hard it is!
Just reminding you to fix this ! ;)