change touch device detection method (#5919)
This commit is contained in:
committed by
GitHub
parent
7daf7a703e
commit
6a5770ee89
+1
-2
@@ -3,7 +3,6 @@ export const isSafari = /^((?!chrome|android).)*safari/i.test(
|
||||
navigator.userAgent,
|
||||
)
|
||||
export const isFirefox = /firefox|fxios/i.test(navigator.userAgent)
|
||||
export const isTouchDevice =
|
||||
'ontouchstart' in window || navigator.maxTouchPoints > 1
|
||||
export const isTouchDevice = window.matchMedia('(pointer: coarse)').matches
|
||||
export const isAndroidWeb =
|
||||
/android/i.test(navigator.userAgent) && isTouchDevice
|
||||
|
||||
Reference in New Issue
Block a user