makotot/react-scrollspy

Not scrolling on Chrome

gicontz opened this issue · 1 comments

Code

<Scrollspy
            items={['general', 'build', 'post-build']}
            currentClassName="is-current"
            rootEl={'.scroll-container'}
          >
            <li>
              <a href={'#general'}>{strings.general}</a>
            </li>
            <li>
              <a href={'#build'}>{'Build'}</a>
            </li>
            <li>
              <a href={'#post-build'}>{strings.postBuild}</a>
            </li>
          </Scrollspy>

Working in Firefox, but not in Chrome

Issue

  1. Click the Anchor links

Expectation

  1. Scroll to the corresponding section

Actual Result

  1. Not Scrolling, stay on the view

Notes

  1. Working scroll spy when scrolling using mouse
  2. Issue only on clicking navigation items

Warnings in Console
[Violation] Added non-passive event listener to a scroll-blocking 'touchstart' event. Consider marking event handler as 'passive' to make the page more responsive.
codemirror.js:536 [Violation] Added non-passive event listener to a scroll-blocking 'touchmove' event. Consider marking event handler as 'passive' to make the page more responsive.
[Violation] Added non-passive event listener to a scroll-blocking 'mousewheel' event. Consider marking event handler as 'passive' to make the page more responsive.
[Violation] 'click' handler took 244ms
image

up