2
0

🐛 Fix select text in buttons node drag

Closes #697
This commit is contained in:
Baptiste Arnaud
2023-09-04 10:34:02 +02:00
parent a79e605285
commit 5092e142ec
2 changed files with 5 additions and 2 deletions

View File

@ -85,7 +85,7 @@ export const ButtonsItemNode = ({ item, indices, isMouseOver }: Props) => {
color={item.content !== 'Click to edit' ? 'inherit' : 'gray.500'} color={item.content !== 'Click to edit' ? 'inherit' : 'gray.500'}
cursor="pointer" cursor="pointer"
/> />
<EditableInput /> <EditableInput onMouseDownCapture={(e) => e.stopPropagation()} />
</Editable> </Editable>
<HitboxExtension /> <HitboxExtension />
<SlideFade <SlideFade

View File

@ -114,7 +114,10 @@ export const ItemNodesList = ({
detachItemFromBlock({ groupIndex, blockIndex, itemIndex }) detachItemFromBlock({ groupIndex, blockIndex, itemIndex })
setPosition(absolute) setPosition(absolute)
setRelativeCoordinates(relative) setRelativeCoordinates(relative)
setDraggedItem(item) setDraggedItem({
...item,
blockId: block.id,
})
} }
const stopPropagating = (e: React.MouseEvent) => e.stopPropagation() const stopPropagating = (e: React.MouseEvent) => e.stopPropagation()