From de5141432c553d301f03b6c5249fe8049b2d3ab0 Mon Sep 17 00:00:00 2001 From: Jared Pereira Date: Wed, 15 Oct 2025 11:32:58 -0400 Subject: [PATCH] disable focus on long press for text blocks was breaking selection on mobile --- components/Blocks/Block.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/components/Blocks/Block.tsx b/components/Blocks/Block.tsx index 78c91cd4..5e88baf2 100644 --- a/components/Blocks/Block.tsx +++ b/components/Blocks/Block.tsx @@ -30,6 +30,7 @@ import { MathBlock } from "./MathBlock"; import { CodeBlock } from "./CodeBlock"; import { HorizontalRule } from "./HorizontalRule"; import { deepEquals } from "src/utils/deepEquals"; +import { isTextBlock } from "src/utils/isTextBlock"; export type Block = { factID: string; @@ -63,8 +64,8 @@ export const Block = memo(function Block( let mouseHandlers = useBlockMouseHandlers(props); - // focus block on longpress, shouldnt the type be based on the block type (?) let { isLongPress, handlers } = useLongPress(() => { + if (isTextBlock[props.type]) return; if (isLongPress.current) { focusBlock( { type: props.type, value: props.entityID, parent: props.parent }, -- 2.51.2