canjs / bit-docs-html-canjs

The plugins to produce CanJS.com
https://www.npmjs.com/package/bit-docs-html-canjs
MIT License
7 stars 0 forks source link

scrolling doesn't work #555

Open justinbmeyer opened 5 years ago

justinbmeyer commented 5 years ago

on: https://canjs.com/doc/guides/data-managing-sessions.html

Recording

Notice that this is not keeping the "midpoint" of the page visible like it was doing before and doing on bitovi/academy.

chasenlehara commented 5 years ago

I’ve looked into this a bit. I initially thought it was because it has a 1ms debounce on the scroll listener, but it looks like bit-docs-html-toc has the same thing.

The biggest difference is bit-docs-html-canjs only changes the scroll position if the active item isn’t visible, so it doesn’t do any unnecessary scrolling, then it relies on the browser to animate the scroll. Maybe that’s why the behavior is different?