jonthornton/jquery-timepicker

disableTouchKeyboard can prevent focus on non-touch devices

scurker opened this issue · 1 comments

Currently, the check being performed is 'ontouchstart' in document, but this doesn't actually check for the existence of a touch device but rather or not the browser has touch events enabled. There's a pretty good discussion on modernizr.

There can be instances where Firefox or Chrome have touch events enabled (such as on Surface tablets) and may or may not actually be a touch device. In the case of jQuery timepicker, this prevents timepicker input field from being focused in some cases where touchevents are enabled but the device isn't actually a touch device.

There doesn't appear to be a good way to detect whether or not the device actually does support touch, so I feel the documentation should be updated at the very least to reflect the caveats of setting disableTouchKeyboard.

Thank you for pointing this out!