use clickoutside for note deselect

This commit is contained in:
Guilhem
2025-11-12 17:08:54 +01:00
parent 05e012c93e
commit a2ac29532e
2 changed files with 6 additions and 1 deletions
@@ -755,7 +755,6 @@
if (selectionManager.mode === 'normal') {
selectionManager.clearSelection()
}
noteManager.clearNoteSelection()
}}
onpanecontextmenu={({ event }) => {
paneContextMenu?.onPaneContextMenu(event)
@@ -15,6 +15,7 @@
import { Button } from '$lib/components/common'
import { getNoteEditorContext } from '../../noteEditor.svelte'
import { getGraphContext } from '../../graphContext'
import { clickOutside } from '$lib/utils'
interface Props {
data: {
@@ -171,6 +172,11 @@
role="button"
tabindex={editMode ? -1 : 0}
ondblclick={handleDoubleClick}
use:clickOutside={{
onClickOutside: () => {
noteManager?.clearNoteSelection()
}
}}
>
<!-- Action buttons - only show in edit mode -->
{#if isEditModeAvailable}