OeverlayScrollbar dynamically changed transfrom is not visible in DOM element #564
-
Describe the bug A clear and concise description of what the bug is. To Reproduce
Expected behavior Examples Environment
The reason I need this property beacuse I created two custom scrollbars and the first one is scrolled automatically that is why I am observing the changes from another scroll container using MutationObserver API and apply transform style to the first one. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 9 replies
-
Good day @mukhammad-akilov :) This change was introduced in version 2.3.0. Supported browsers (such as chrome) use the scrolltimeline api to move the scrollbar handles. Eventually this will be the way how the scrollbar handles will move in every browser because it improves the performance signifficantly. Since the value you need is calculated from other values you shouldn't need a MutationObserver at all. Can you post an example of what you exactly wanna create? I would look into it and make an version which works without the MutationObserver. |
Beta Was this translation helpful? Give feedback.
@mukhammad-akilov I've created a improved example here which hopefully should solve the chrome issue and the "scroll till the end" issue: https://stackblitz.com/edit/vitejs-vite-xiuxru?file=src%252Findex.ts (increased the speed to 100) I've also synced the transition and interval speed to
250ms
. (you can customize this as you want, just keep them in sync to have the best possible experience)Regarding syncing the speed, what do you exactly mean? You would just need to increase the number