Scrolling on iOS is blocked even when blocking is set to false
See original GitHub issueIf you open the BottomSheet it will block any scrolling containers on iOS even if the BottomSheet is configured as false
.
Example link: https://react-spring-blocking-ios-scroll.vercel.app/
Example code:
import { useState } from 'react';
import { BottomSheet } from 'react-spring-bottom-sheet';
import 'react-spring-bottom-sheet/dist/style.css';
export default function Home() {
const [open, setOpen] = useState(false);
return (
<>
<button onClick={() => setOpen(true)}>Open</button>
<div style={{ border: '3px solid red', overflowY: 'scroll', height: '100px' }}>
<div>1</div>
<div>2</div>
<div>3</div>
<div>4</div>
<div>5</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
<div>1</div>
</div>
<BottomSheet open={open} blocking={false}>
<div>Bottom Sheet Content</div>
<div>Bottom Sheet Content</div>
<div>Bottom Sheet Content</div>
<div>Bottom Sheet Content</div>
<div>Bottom Sheet Content</div>
<div>Bottom Sheet Content</div>
<div>Bottom Sheet Content</div>
<div>Bottom Sheet Content</div>
</BottomSheet>
</>
);
}
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (1 by maintainers)
Top Results From Across the Web
Blocking feature not working - Apple Support Communities
Go to the conversation thread in the Messages app of the contact you'd like to block and tap on the contact's name. ·...
Read more >Simple Solution to Prevent Body Scrolling on iOS
The most straightforward way for disabling scrolling on websites is to add overflow: hidden on the <body> tag. Depending on the situation, this ......
Read more >Issue in blocking Vertical scroll on UIScrollView in Swift 4.0
Save this question. Show activity on this post. and once I block the vertical scroll, this function to scrollReactToVisible doesn't do anything.
Read more >overflow-x - CSS: Cascading Style Sheets - MDN Web Docs
This may be nothing, a scroll bar, or the overflow content. ... overflow-x CSS property sets what shows when content overflows a block-level ......
Read more >How To Prevent Scrolling The Page On iOS Safari 15 - PQINA
On iOS 100vh is always the full height of the viewport, even if the footer ... want to block all overflowing content */...
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
Ran into this too. Adding
data-body-scroll-lock-ignore="true"
will fix it.There are potentially some improvements that can be made here, some ideas:
-webkit-fill-available
might be worth a look?Thanks for a great lib 😃