9 years ago by Joncom
In "input.js", there is a line that looks like this:
Another line should be appended after it so that we have:
Why?
For example, on iOS, pressing down on a button that happens to be flush with the bottom of the screen, and then dragging up will open the Control Center. This will trigger a
Therefore, without adding the second line, the button will remain pressed down, even after closing the Control Center.
This should be a minor issue with vanilla Impact, because a new
This is a major issue for anyone supporting multi-touch, because without handling
ig.system.canvas.addEventListener('touchend', this.keyup.bind(this), false );
Another line should be appended after it so that we have:
ig.system.canvas.addEventListener('touchend', this.keyup.bind(this), false ); ig.system.canvas.addEventListener('touchcancel', this.keyup.bind(this), false );
Why?
For example, on iOS, pressing down on a button that happens to be flush with the bottom of the screen, and then dragging up will open the Control Center. This will trigger a
touchcancel
event. No touchend
event will ever fire for this touch.Therefore, without adding the second line, the button will remain pressed down, even after closing the Control Center.
This should be a minor issue with vanilla Impact, because a new
touchstart
and touchend
should clear things. Although, it is odd that technically multiple "pressed" events can fire before a "released" event.This is a major issue for anyone supporting multi-touch, because without handling
touchcancel
, it's very possible to have several permanently "pressed down" and "stuck" touch events active around the canvas.