Anchor links within tables don’t scroll to target content in Firefox
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 42
- Forks
- 160
- Avg merge
- 3h 9m
- Merged PRs (30d)
- 4
Description
Description
Anchor scroll behavior is inconsistent specifically in Firefox. (With this issue, behavior is fine in Chrome, Safari, and Edge.)
Choosing an anchor link that’s inside a table in the page content will update the browser URL without scrolling to page content as expected. In the case of the Controller Actions pages, choosing the exact same item from the sidebar/TOC menu works as expected.
Pages where this can be observed:
- https://craftcms.com/docs/3.x/dev/controller-actions.html
- https://craftcms.com/docs/commerce/3.x/dev/controller-actions.html
- https://craftcms.com/docs/3.x/config/ (see
CRAFT_BASE_PATHlink)
Steps to reproduce
- Visit one of the pages above in Firefox.
- Find a link within a table in the main content and click it.
- Observe that nothing happens.
- Find the equivalent link in the sidebar or other page copy and click it.
- Observe that you’re immediately scrolled to the expected content.
Additional Information
Firefox 88.0 on macOS 11.3.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue in Firefox on the listed Controller Actions or config documentation pages, comparing links inside tables with equivalent sidebar links. Trace the documentation site's anchor-link handling from the page or site entry point used for those pages. Done means table-contained anchors update the URL and scroll to the same target content in Firefox as in other browsers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- documentation, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100