#49 : Separate handlers for touchable and non toachable devices

This commit is contained in:
Vadim
2021-08-06 22:25:02 +03:00
parent ab3a66e06a
commit b66ab30a0d
7 changed files with 68 additions and 21 deletions

View File

@@ -16,3 +16,11 @@ export function createDispatcher(source) {
}
return dispatch
}
export function getIsTouchable() {
return (
('ontouchstart' in window) ||
(navigator.maxTouchPoints > 0) ||
(navigator.msMaxTouchPoints > 0)
)
}