mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-11-19 20:24:49 +01:00
fix tests
This commit is contained in:
@@ -2408,7 +2408,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 =
|
const hasCoarsePointer =
|
||||||
"matchMedia" in window && window.matchMedia("(pointer: coarse)").matches;
|
"matchMedia" in window &&
|
||||||
|
window?.matchMedia("(pointer: coarse)")?.matches;
|
||||||
const isTouchMobile = hasTouch && hasCoarsePointer;
|
const isTouchMobile = hasTouch && hasCoarsePointer;
|
||||||
|
|
||||||
return isMobile || isTouchMobile;
|
return isMobile || isTouchMobile;
|
||||||
|
|||||||
@@ -1174,9 +1174,7 @@ exports[`contextMenu element > selecting 'Add to library' in context menu adds e
|
|||||||
},
|
},
|
||||||
"suggestedBindings": [],
|
"suggestedBindings": [],
|
||||||
"theme": "light",
|
"theme": "light",
|
||||||
"toast": {
|
"toast": null,
|
||||||
"message": "Added to library",
|
|
||||||
},
|
|
||||||
"userToFollow": null,
|
"userToFollow": null,
|
||||||
"viewBackgroundColor": "#ffffff",
|
"viewBackgroundColor": "#ffffff",
|
||||||
"viewModeEnabled": false,
|
"viewModeEnabled": false,
|
||||||
|
|||||||
Reference in New Issue
Block a user