Detect if a device is mouseOnly, touchOnly, or hybrid, and if the primary input is mouse or touch.
pointer
media query instead of hover
media query to determine primaryInput
to fix issues on Samsung devices using Chrome v65detect-passive-events
to fix bug in Edge v15detect
dependenciestouchOnly
device, so if the browser is an affected Windows Chrome version and hasTouch
, then assume it's a hybrid with primaryInput: 'mouse'
detectIt.primaryInput
replaces primaryHover
and primaryPointer
, primary hover and pointer can be accessed through detectIt.state.detectHover
and detectIt.state.detectPointer
detectIt.hasTouch
now indicates that the device supports the Touch Events API, and replaces detectIt.hasTouchEventsApi
detectIt.hasMouse
which indicates that the deviceType
is mouseOnly
or hybrid