iodide-project / iodide-project/iodide
how to handle in-page anchors and out-of-page links?
- Dominant language
- JavaScript
- Stars
- 1.5k
- Forks
- 145
- PR merge metrics
- No merged PRs in 30d
Description
see this notebook:
https://alpha.iodide.io/notebooks/2807/
if we don't add `target="_self"` to links link ``, the link will open in a new tab. that behavior is pretty disruptive, but so too is losing computed state by accidentally following a link that takes you off the page, which is why we set the top-level link opening behavior to be to open in a new tab: ``.
i think the behavior we actually want is:
1. treat in-page anchor links normally -- just go to the anchor on the page
2. always open out-of-page links in a new tab
a very brief look around indicates that we probably need to use a bit of JS to make things work this way.
(thanks @teonbrooks for spotting this bug)
Contributor guide
Assessment
This issue has not been assessed yet.