Comments (3)
Good day @joshkalsi :)
The behavior in your example is normal browser behavior and is not related to the plugin... If you switch out the OverlayScrollbarsComponent
with a simple div
which has overflow: auto
as style you'll get the same behavior. (https://codesandbox.io/p/sandbox/overlayscrollbars-fixed-element-bug-forked-glhnx9?file=%2Fsrc%2FApp.js%3A14%2C13)
The difference between your example and #249 is that in the other issue the fixed element is not wrapped in a different overflowing container but its nearest overflowing container is the body element / the window scroller element.
If I change your example to the equivalent the native behavior is what you would expect. (https://codesandbox.io/p/sandbox/overlayscrollbars-fixed-element-bug-forked-27nc8l?file=%2Fsrc%2FApp.js%3A11%2C13)
If I then apply OverlayScrollbars
to the body element it has the behavior you want and what was fixed in #249 (https://codesandbox.io/p/sandbox/overlayscrollbars-fixed-element-bug-forked-rpqy54?file=%2Fsrc%2FApp.js%3A13%2C11)
In this case its really important which element is the overflowing container (some div
or the body
element) for the fixed
element.
from overlayscrollbars.
That's sorted the issue, thank you, didn't even think to check if it would have the same issue with native scroll! Appreciate the quick response, thanks again 👍
from overlayscrollbars.
@joshkalsi Youre welcome :)
from overlayscrollbars.
Related Issues (20)
- react-window flickers HOT 2
- Get scroll position Nuxt 3 inside onMounted HOT 6
- Scrollbar hiding even while grabbing HOT 4
- Scrollbar thumb jumping back to start position during window resize HOT 4
- What is wrong with such a simple example using overlayscrollbars-ngx? HOT 3
- Bootstrap tooltip not working when using the plugin for body tag HOT 6
- A humble request for some new features HOT 5
- OverlayScrollbars.scroll() function from v1 not present in v2 HOT 3
- Jest with Node.js v20.11.0 does not understand overlayscrollbars-react HOT 17
- The 'blur' event fires when the input element with 'autoFocus' set to 'true' is wrapped with 'OverlayScrollbars'. HOT 17
- Need A Clear, Simple, React Example HOT 1
- Unable to get overlay scrollbar on the Vue Portal element HOT 5
- overlayscrollbars svelte webpack: Cannot read properties of undefined (reading '$$') HOT 6
- Per axis visibility? HOT 6
- OverlayScrollbar Tutorial HOT 5
- Trying to use this package through npm but can't. What am I doing wrong? HOT 1
- request HOT 2
- Typescript compile error: @types/react/jsx-runtime"' has no exported member 'JSX' HOT 12
- How do I make the scrollbar sticky? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from overlayscrollbars.