Fix drawer open bug in iOS Safari.

This commit is contained in:
Dermot Duffy
2022-08-13 13:48:01 -07:00
parent 86a1ae785c
commit 70d445d921
3 changed files with 24 additions and 11 deletions
+9 -1
View File
@@ -76,4 +76,12 @@ export function errorToConsole(e: Error, func?: CallableFunction): void {
} else {
func(e);
}
}
}
/**
* Determine if the device supports hovering.
* @returns `true` if the device supports hovering, `false` otherwise.
*/
export const isHoverableDevice = (): boolean => window.matchMedia(
'(hover: hover) and (pointer: fine)',
).matches;