fix: use Svelte dispatch for verstak-link events in MarkdownPreview

Problem: MarkdownPreview dispatched DOM CustomEvent via link.dispatchEvent()
which doesn't propagate through Svelte's event system. The on:verstak-link
handler on <MarkdownPreview> in NoteEditorPanel only catches Svelte dispatch()
events, not DOM CustomEvents from {@html} content.

Fix: Replaced DOM CustomEvent dispatch with Svelte createEventDispatcher.
Now handleClick() in MarkdownPreview calls dispatch('verstak-link', {...})
which properly propagates through NoteEditorPanel → App.svelte chain.

Also: removed unused importInternalLink import (was unused after
InternalLinkPicker replaced the manual modal).
This commit is contained in:
2026-06-15 12:36:32 +08:00
parent db961ff0c3
commit 2cbb2986c1
3 changed files with 19 additions and 19 deletions
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -19,7 +19,7 @@
background: #13131f;
}
</style>
<script type="module" crossorigin src="/assets/main-BuG9iGkd.js"></script>
<script type="module" crossorigin src="/assets/main-DwDG7FeH.js"></script>
<link rel="stylesheet" crossorigin href="/assets/main-bQpH1es2.css">
</head>
<body>