Make touchscreen detection more robust

Empirically, Chrome on Android can end up not matching (hover: none), but still matching (pointer: coarse). 😕
This commit is contained in:
Robin
2023-09-18 19:24:22 -04:00
parent 535712d108
commit b3ef5ac929

View File

@@ -67,7 +67,7 @@ export function Modal({
...rest
}: ModalProps) {
const { t } = useTranslation();
const touchscreen = useMediaQuery("(hover: none)");
const touchscreen = useMediaQuery("(hover: none) or (pointer: coarse)");
const onOpenChange = useCallback(
(open: boolean) => {
if (!open) onDismiss?.();