From 55ecec9e7bfec0b0cba2e7cae2d449bc48b2dca9 Mon Sep 17 00:00:00 2001 From: Steve Ruiz Date: Fri, 9 Jul 2021 21:32:04 +0100 Subject: [PATCH] Fixes text selection on touch devices. --- state/shape-utils/text.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/state/shape-utils/text.tsx b/state/shape-utils/text.tsx index 145ceb5e6..676217e2f 100644 --- a/state/shape-utils/text.tsx +++ b/state/shape-utils/text.tsx @@ -116,7 +116,8 @@ const text = registerShapeUtils({ setTimeout(() => state.send('BLURRED_EDITING_SHAPE', { id }), 0) } - function handleFocus() { + function handleFocus(e: React.FocusEvent) { + e.currentTarget.select() state.send('FOCUSED_EDITING_SHAPE', { id }) }