Skip to content

Best way of detecting touch-enabled devices #2

@ixisio

Description

@ixisio

Could be done with:

 // Detect Touch Devices
  if ('createTouch' in document) flag('touch')
  if (window.navigator.msPointerEnabled) flag('mspointer')
  if (window.navigator.msPointerEnabled && window.navigator.msMaxTouchPoints) flag('touch')

Any know issue with that? Is there another way?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions