Disable drag and drop for components in the selected path when edit mode is enabled to fix firefox issue with text selection when draggable attribute is set
This commit is contained in:
parent
f14e6d8e22
commit
ce75b8c9a7
|
@ -63,6 +63,7 @@
|
||||||
$: selected =
|
$: selected =
|
||||||
$builderStore.inBuilder && $builderStore.selectedComponentId === id
|
$builderStore.inBuilder && $builderStore.selectedComponentId === id
|
||||||
$: inSelectedPath = $builderStore.selectedComponentPath?.includes(id)
|
$: inSelectedPath = $builderStore.selectedComponentPath?.includes(id)
|
||||||
|
$: inDragPath = inSelectedPath && $builderStore.editMode
|
||||||
|
|
||||||
// Interactive components can be selected, dragged and highlighted inside
|
// Interactive components can be selected, dragged and highlighted inside
|
||||||
// the builder preview
|
// the builder preview
|
||||||
|
@ -72,7 +73,7 @@
|
||||||
!isBlock
|
!isBlock
|
||||||
$: editable = definition.editable
|
$: editable = definition.editable
|
||||||
$: editing = editable && selected && $builderStore.editMode
|
$: editing = editable && selected && $builderStore.editMode
|
||||||
$: draggable = !editing && interactive && !isLayout && !isScreen
|
$: draggable = !inDragPath && interactive && !isLayout && !isScreen
|
||||||
$: droppable = interactive && !isLayout && !isScreen
|
$: droppable = interactive && !isLayout && !isScreen
|
||||||
|
|
||||||
// Empty components are those which accept children but do not have any.
|
// Empty components are those which accept children but do not have any.
|
||||||
|
|
Loading…
Reference in New Issue