Skip to content

Check for touch support not working across all devices #929

Open
@Narigo

Description

@Narigo

createjs.Touch.isSupported and a few other places use "ontouchstart" in window to check if a device is capable of using touch and which (prefixed) versions it can use.

When we tried it on a Dell Optiplex 9030, the property "ontouchstart" in window returns false in Chrome, even though that device is a touch enabled PC. If we enable the developer tools (with emulating Touch) and restart the page, Chrome returns a true there. Maybe there is a better way to

Our current workaround is setting window.ontouchstart = null; before including createjs / using createjs.Touch.enable.

If we change all occurrences of "ontouchstart" in window into (!!window.TouchEvent), we can run it on the Dell Touch PC with working touch, but we haven't tested this on a touch only / mobile device.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions