simple-scrollspy icon indicating copy to clipboard operation
simple-scrollspy copied to clipboard

Refactor: Add throttle for the scroll event handler

Open kimyvgy opened this issue 2 years ago • 0 comments

When scrolling fast, the scroll event handler is called too many times. Therefore, the activeClass adds / removes to every the menu items.

Expect: Only add activeClass 1 time for the menu item when scrolling stopped.

kimyvgy avatar May 26 '23 07:05 kimyvgy