Fix scrollToHash to handle hashes starting with a number#481
Fix scrollToHash to handle hashes starting with a number#481ryansolid merged 2 commits intosolidjs:mainfrom
Conversation
🦋 Changeset detectedLatest commit: c61231d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Do you see any reason why we wouldn't always use get document by id? I admit I wasn't responsible for the hash router implementation so the fact that there is all this query selector stuff just for this case sort of surprises me. I will do some forensics here but the native DOM behavior seems to be restricted to ids so I don't see benefit in applying a general selector and trying to restrict it to fit. |
|
I prefer to use |
When hash starts with a number,
document.querySelectorthrows an error, causingscrollToHashto fail.