blocking on scroll doesn't seem to work
See original GitHub issueDescribe the bug When scrolling on mobile I cannot get the swipe to block.
To Reproduce Here’s my code:
`
<SwipeableList>
<SwipeableListItem
threshold={0.2}
style={{ marginTop: "0px" }}
swipeLeft={{
content: <span style={{ fontSize: "3em" }}>😍</span>,
}}
swipeRight={{
content: <span style={{ fontSize: "3em" }}>😒</span>,
}}
>
<div>
<Text> hello</Text>
</div>
</SwipeableListItem>
<SwipeableListItem
threshold={0.2}
style={{ marginTop: "0px" }}
swipeLeft={{
content: <span style={{ fontSize: "3em" }}>😍</span>,
}}
swipeRight={{
content: <span style={{ fontSize: "3em" }}>😒</span>,
}}
>
<div>
<Text> hello</Text>
</div>
</SwipeableListItem>
</SwipeableList>
`
I expected to block swiping when scrolling up or down. The blockSwipe prop on SwipeableListItem does work though.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Blocking scroll in a popin modal - Stack Overflow
I am working on a CMP implementation. ... Any tips about how to block the scroll behind? ... I tried that, but it...
Read more >How to prevent overflow scrolling in CSS - LogRocket Blog
The scroll value of the overflow property adds horizontal and vertical scroll bars so you can adjust or scroll the content if it's...
Read more >Hammer blocking scroll · Issue #10541 · angular ... - GitHub
Current behavior. If I listen for a hammer.js event on an element, it blocks vertical scrolling. Expected/desired behavior.
Read more >Mouse wheel scrolling does not work for elements such as div ...
Mouse wheel scrolling does not work for elements such as div using overflow - auto or scroll.
Read more >Pop-up doesn't display, can't scroll - WordPress.org
1) If you used the CSS fix, it got wiped out for some reason. Maybe when you upgraded WordPress, upgraded or changed your...
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 FreeTop 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
Top GitHub Comments
@MarkTension we have released new version, the branch from my previous comment does not exist anymore so please just use
npm install @sandstreamdev/react-swipeable-list
to install.And you can set
threshold
onSwipeableList
component, no need to do this separately for eachSwipeableListItem
.We blocked only within list component. Now you can enter element for which scrolling is blocked. Please check following branch:
npm install git://github.com/sandstreamdev/react-swipeable-list.git#fix_for_issues_36
and then in code add prop for
SwipeableList
<SwipeableList scrollElement={window}>
Let me know if it helps.