Navlink | Bug | Prevent JS errors in Navlink When Clicking on "Non Scroll-to" Links #1322
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Jira
http://vjira2:8080/browse/BDS-1728
Summary
Updates the Navlink JS to fix JS errors getting thrown if a link that gets clicked on isn't a link that would get scrolled to.
Details
super
calls to the Navlink's older JSHow to test
npm run setup
, and start up the local dev environment vianpm start
docs-site/src/templates/_page-header.twig
and add a few new fake links to do a smoke test on a few different Navlink use cases:Locally, on the main docs site homepage, click on a few different Navlinks in the Navbar to test out the following use cases:
Navigate to the sticky navbar demo page and confirm that when clicking on a navbar nav link that DOES have a matching HTML element with the expected ID, the matching element is smooth scrolled into view as expected.