Open Nyconing opened 5 years ago
Reproducing:
perfect-scrollbar
on it.I have done: https://stackblitz.com/edit/angular-nhoplx
Edit:
I have found another scrollbar ngx-scrollbar
without glitches (may help to eliminate glitches)
Reproduce it with same way:
https://stackblitz.com/edit/angular-1z7qxn
This is just a wrapper for the PS and its a traditional JS library so it won't play that nice with all Angular features. So if you want to keep the scroll position on route transitions you need to implement that yourself, PS won't provide such feature.
Afaik,
perfect-scrollbar
rely on activated component because it triggers a lot of events and everything are controlled by running codes include scroll-state.Unfortunately, Angular's route transition doing animation by deactivating the component before
:leave
animation, this cause all of theperfect-scrollbar
reseted to x0 y0 scroll position.