fix touch events (#11265)

This commit is contained in:
Josh Hawkins authored and GitHub committed 2024-05-06 12:35:18 -06:00
1 parent 306c11d730
commit c0073db859
3 files changed
+6 -6

No files matched your search

+1 -1
View File
@@ -98,7 +98,7 @@ export default function LiveCameraView({ camera }: LiveCameraViewProps) {
let clientX;
let clientY;
if (e.nativeEvent instanceof TouchEvent) {
if ("TouchEvent" in window && e.nativeEvent instanceof TouchEvent) {
clientX = e.nativeEvent.touches[0].clientX;
clientY = e.nativeEvent.touches[0].clientY;
} else if (e.nativeEvent instanceof MouseEvent) {