iOS double scrollbar
See original GitHub issueDescribe the bug
- Two vertical scrollbars (native + simplebar) on iOS Chrome and Safari.
To Reproduce
- Seems to happen no matter the parent container, or styling, or props. It happens on the simplest reproducible example. I’ve tried using code from the demo, I’ve tried different variations, removing parent containers. Everything.
Additional context
- Using simplebar-react
- The bug does not happen on the live simplebar demo.
- I don’t believe I have any global styles overriding.
Is the live demo using simplebar-react? Possible this is an issue with that package directly?
import SimpleBar from 'simplebar-react'
...
<SimpleBar style={{ height: '300px' }}>
{[...Array(50)].map((x, i) => (
<p key={i} className="odd">
Some content
</p>
))}
</SimpleBar>
Your environment
| Software | Version(s) |
|---|---|
| SimpleBar | latest |
| Browser | chrome, iOS |
| npm/Yarn | yarn latest |
| Operating System | iOS |
Issue Analytics
- State:
- Created 4 years ago
- Reactions:5
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Overflow hidden issue with double scrolling on iOS
The problem is that I have a body (which it can't be positioned fixed because it causing bugs to the current project) with...
Read more >[Solved]-Overflow hidden issue with double scrolling on iOS
I got pretty good results by adding this to your css: body.modal-open > .parent { position: fixed; overflow: hidden; height: 100%; }.
Read more >iOS 14 and browser scroll bars (webkit) - Apple Developer
Hello! I have this scrollable container. It works fine across browsers and devices until it hits iOS14. Behaves just the way it should...
Read more >Solved: Double scrollbar - Power Platform Community
Solved: Is there a way to prevent double scrollbars in the scrolling screen?
Read more >153852 – <body> with overflow:hidden CSS is scrollable on iOS
Open the attached testcase in iOS Safari. 2. Tap the "Launch demo modal" ... overflow: hidden applies only to the layout viewport scrolling....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

hey @barnu5, as I said you won’t see those double scrollbars on that codepen, as I have already tested it. but here is another development that I found. In my css if I add this
::-webkit-scrollbar { display: none; }I don’t see the default scrollbar then, and only custom scrollbar is visible as needed. But still not sure why it happened.Hi @knightMash, ah right apologies, that makes sense.
Excellent work! That fixed it for me.