mirror of
https://github.com/excalidraw/excalidraw
synced 2025-07-25 13:58:22 +08:00
fix tests
This commit is contained in:
@ -2400,7 +2400,8 @@ class App extends React.Component<AppProps, AppState> {
|
|||||||
|
|
||||||
private isMobileOrTablet = (): boolean => {
|
private isMobileOrTablet = (): boolean => {
|
||||||
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
const hasTouch = "ontouchstart" in window || navigator.maxTouchPoints > 0;
|
||||||
const hasCoarsePointer = window.matchMedia("(pointer: coarse)").matches;
|
const hasCoarsePointer =
|
||||||
|
"matchMedia" in window && window.matchMedia("(pointer: coarse)").matches;
|
||||||
const isTouchMobile = hasTouch && hasCoarsePointer;
|
const isTouchMobile = hasTouch && hasCoarsePointer;
|
||||||
|
|
||||||
return isMobile || isTouchMobile;
|
return isMobile || isTouchMobile;
|
||||||
|
Reference in New Issue
Block a user