Fixes text selection on touch devices.

This commit is contained in:
Steve Ruiz 2021-07-09 21:32:04 +01:00
parent e9d070f354
commit 55ecec9e7b

View file

@ -116,7 +116,8 @@ const text = registerShapeUtils<TextShape>({
setTimeout(() => state.send('BLURRED_EDITING_SHAPE', { id }), 0)
}
function handleFocus() {
function handleFocus(e: React.FocusEvent<HTMLTextAreaElement>) {
e.currentTarget.select()
state.send('FOCUSED_EDITING_SHAPE', { id })
}