diff --git a/examples/svelte/src/routes/examples/customnode/CustomNode.svelte b/examples/svelte/src/routes/examples/customnode/CustomNode.svelte
index 6bc71e2e..30182418 100644
--- a/examples/svelte/src/routes/examples/customnode/CustomNode.svelte
+++ b/examples/svelte/src/routes/examples/customnode/CustomNode.svelte
@@ -13,7 +13,7 @@
Custom Color Picker Node: {bg.color}
(bg.color = evt.currentTarget.value)}
value={bg.color}
diff --git a/packages/svelte/src/lib/container/Pane/Pane.svelte b/packages/svelte/src/lib/container/Pane/Pane.svelte
index 4fb5f0f3..7b76a65e 100644
--- a/packages/svelte/src/lib/container/Pane/Pane.svelte
+++ b/packages/svelte/src/lib/container/Pane/Pane.svelte
@@ -97,12 +97,18 @@
const isNoKeyEvent =
event.target !== container && !!(event.target as HTMLElement).closest('.nokey');
+ const isSelectionActive =
+ (selectionOnDrag && container === event.target) ||
+ !selectionOnDrag ||
+ store.selectionKeyPressed;
+
if (
!store.elementsSelectable ||
!isSelecting ||
event.button !== 0 ||
!containerBounds ||
isNoKeyEvent ||
+ !isSelectionActive ||
!event.isPrimary
) {
return;