mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-09-26 10:49:57 +02:00
fix tests
This commit is contained in:
@@ -2400,7 +2400,8 @@ class App extends React.Component<AppProps, AppState> {
|
||||
|
||||
private isMobileOrTablet = (): boolean => {
|
||||
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;
|
||||
|
||||
return isMobile || isTouchMobile;
|
||||
|
Reference in New Issue
Block a user