fix: ignore maxTouchPoints === 256 (#493)
It can occur, that a browser on Windows 10 reports a maxTouchPoints count of 256, even though the device is a desktop system without any touch functionality at all. See also: https://stackoverflow.com/a/67909182 Signed-off-by: Dominik Willner <th33xitus@gmail.com>
This commit is contained in:
parent
5286be32b1
commit
bc353a060d
@ -61,7 +61,8 @@ export default class BaseMixin extends Vue {
|
||||
}
|
||||
|
||||
get isTouchDevice() {
|
||||
return (('ontouchstart' in window) || (navigator.maxTouchPoints > 0))
|
||||
// ignore if browser reports maxTouchPoints === 256, can happen on Windows 10
|
||||
return (('ontouchstart' in window) || (navigator.maxTouchPoints > 0 && navigator.maxTouchPoints !== 256))
|
||||
}
|
||||
|
||||
get moonrakerComponents() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user