You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When an id starts with a number, like an element with id="1-Sign-Up-to-create-the-User", it crashes when trying to be scrolled to.
Steps to reproduce
Apply gatsby-plugin-anchor-links on a Gatsby website with an anchor link.
In my setup I use gatsby-plugin-mdx with gatsby-remark-autolink-headers to generate the id:s and links, but I'm positive any page with an id value that starts with a number will suffice.
Expected result
The id should be scrolled to successfully.
Actual result
It crashes on:
Uncaught DOMException: Document.querySelector: '1-Sign-Up-to-create-the-User' is not a valid selector
I encountered the same problem: the website crashes if the heading is starting with a number and you want to navigate to it. The problem looks to be inside the dependency "scroll to element".
Description
When an id starts with a number, like an element with
id="1-Sign-Up-to-create-the-User"
, it crashes when trying to be scrolled to.Steps to reproduce
Apply
gatsby-plugin-anchor-links
on a Gatsby website with an anchor link.In my setup I use
gatsby-plugin-mdx
withgatsby-remark-autolink-headers
to generate the id:s and links, but I'm positive any page with anid
value that starts with a number will suffice.Expected result
The id should be scrolled to successfully.
Actual result
It crashes on:
because of the dependency of this package, https://github.com/willhoag/scroll-to-element.
Environment
The text was updated successfully, but these errors were encountered: