Skip to content

fix(viewer): Unneeded manual internal link; Fix target is in LaTeX #215

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
9 changes: 0 additions & 9 deletions packages/viewer/src/components/Shared/Typeset.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,6 @@
}
}

/**
* We're adding "real" <a/> tags to the DOM, even for parsed internal
* links, but we really want to use the router to navigate. So we manually
* bind click handlers to trigger navigation.
*/
for (const link of container.getElementsByClassName('internal-link')) {
/**
* Unloading a DOM node should remove any bound listeners, but it's
Expand All @@ -48,10 +43,6 @@
})

link.setAttribute('_wired', 'true')
link.addEventListener('click', e => {
e.preventDefault()
goto((e.target as HTMLAnchorElement).href)
})
}
}

Expand Down
Loading