diff --git a/src/lib/components/Editor.svelte b/src/lib/components/Editor.svelte index 3a503af..cc5d1a7 100644 --- a/src/lib/components/Editor.svelte +++ b/src/lib/components/Editor.svelte @@ -370,8 +370,6 @@ // Info panel let showInfo = $state(false); - let infoPanelEl = $state(null); - let infoToggleBtnEl = $state(null); let wordCount = $state(0); let charCount = $state(0); let infoPathCopyState = $state<'idle' | 'copied' | 'error'>('idle'); @@ -4316,21 +4314,6 @@ if ($sourceMode) updateCounts(); }); - // Auto-close info panel on click outside - $effect(() => { - if (!showInfo) return; - function onInfoClickAway(e: MouseEvent) { - if ( - infoPanelEl && !infoPanelEl.contains(e.target as Node) && - infoToggleBtnEl && !infoToggleBtnEl.contains(e.target as Node) - ) { - showInfo = false; - } - } - document.addEventListener('mousedown', onInfoClickAway); - return () => document.removeEventListener('mousedown', onInfoClickAway); - }); - // Close in-note search when switching notes let prevSearchPath = ''; $effect(() => { @@ -6142,7 +6125,6 @@