From c45433c8db7de2919569fc3aadb3cf2a20d8c8d0 Mon Sep 17 00:00:00 2001 From: Zsolt Viczian Date: Sun, 20 Mar 2022 19:03:16 +0100 Subject: [PATCH] testing to understand why it does not work on iOS --- src/components/Actions.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/Actions.tsx b/src/components/Actions.tsx index 48ef943c4..3ed084b9b 100644 --- a/src/components/Actions.tsx +++ b/src/components/Actions.tsx @@ -197,6 +197,7 @@ export const ShapesSwitcher = ({ penDetected: boolean; setDeviceType: (obj: Partial) => void; }) => { + const pd = useDeviceType().penDetected; return ( <> {SHAPES.map(({ value, icon, key }, index) => { @@ -219,7 +220,7 @@ export const ShapesSwitcher = ({ aria-keyshortcuts={shortcut} data-testid={value} onChange={({ pointerType }) => { - if (!penDetected && pointerType === "pen") { + if (!pd && pointerType === "pen") { setAppState({ penMode: true }); setDeviceType({ penDetected: true }); }