diff --git a/src/lib/components/modes/treemode/JSONNode.svelte b/src/lib/components/modes/treemode/JSONNode.svelte index 8612a2f6..0e3c0f0e 100644 --- a/src/lib/components/modes/treemode/JSONNode.svelte +++ b/src/lib/components/modes/treemode/JSONNode.svelte @@ -244,21 +244,31 @@ hover = null } - function handleInsertInside() { - onSelect({ type: SELECTION_TYPE.INSIDE, path }) + function handleInsertInside(event) { + if (!event.shiftKey) { + event.stopPropagation() + event.preventDefault() + + onSelect({ type: SELECTION_TYPE.INSIDE, path }) + } } - function handleInsertAfter() { - onSelect({ type: SELECTION_TYPE.AFTER, path }) + function handleInsertAfter(event) { + if (!event.shiftKey) { + event.stopPropagation() + event.preventDefault() + + onSelect({ type: SELECTION_TYPE.AFTER, path }) + } } function handleInsertInsideOpenContextMenu(event) { - handleInsertInside() + handleInsertInside(event) onContextMenu(event) } function handleInsertAfterOpenContextMenu(event) { - handleInsertAfter() + handleInsertAfter(event) onContextMenu(event) }