Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/components/Code/Viewer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,11 @@ watch(
function handleImportLinkNavigate() {
if (!codeRef.value) return

const anchors = codeRef.value.querySelectorAll('a.import-link')
const anchors = codeRef.value.querySelectorAll<HTMLAnchorElement>('a.import-link')
anchors.forEach(anchor => {
// NOTE: We do not need to remove previous listeners because we re-create the entire HTML content on each html update
anchor.addEventListener('click', event => {
if (event.metaKey || event.altKey || event.ctrlKey || event.shiftKey) return
const href = anchor.getAttribute('href')
if (href) {
event.preventDefault()
Expand Down
Loading