Browse Source

Fix issue editing components in the preview when nested inside another draggable component

master
Andrew Kingston 5 years ago
parent
commit
c48a56b997
  1. 3
      packages/client/src/components/Component.svelte
  2. 2
      packages/client/src/utils/styleable.js

3
packages/client/src/components/Component.svelte

@ -67,7 +67,8 @@
$: renderKey = `${propsHash}-${emptyState}`
$: editable = definition.editable
$: editing = editable && selected && $builderStore.editMode
$: draggable = interactive && !isLayout && !isScreen && !editing
$: draggable =
interactive && !isLayout && !isScreen && !$builderStore.editMode
$: droppable = interactive && !isLayout && !isScreen
// Update component context

2
packages/client/src/utils/styleable.js

@ -42,7 +42,7 @@ export const styleable = (node, styles = {}) => {
}
// Allow dragging if required
node.setAttribute("draggable", !!styles.draggable)
node.setAttribute("draggable", !!newStyles.draggable)
// Applies a style string to a DOM node
const applyStyles = styleString => {

Loading…
Cancel
Save