bp74/StageXL — pull request #140 by xavierhainaux (2014-09-16 10:20:57+00:00)
Title: Add preventDefaultOnTouch property

Hello Bernard,
I would like to control whether StageXL calls “preventDefault” on the touch events.

Example where this can be useful:
On the iphone, there is the browser's bars that take a lot of space on the screen. The only way for the user to hide it, is to do a swipe gesture. But it requires that the canvas doesn’t call “preventDefault” or the canvas will swallow the event.
With this property, we can detect when the bar are visible (with window.innerHeight) and toggle the property for that time.

As of now, to make it works, we add a div element above the canvas when the bar are visible but this has the disadvantage that it prevent every other interactions with the canvas.

There is a similar use case on Chrome for android.

We can of course discuss another name for the property or even an alternative solution if you prefer.

Thank you.