Comments (17)
same problem, any news on this issue?
Not really. I did a workaround
Share your solution?
from react-modal-sheet.
Still having the same problem.
from react-modal-sheet.
Hello!
This issue is only related to Android; everything works correctly on iOS.
from react-modal-sheet.
Hello @Temzasse
I've also encountered this issue. Your demonstrative example doesn't work on Android mobile devices. I tested it on Chrome and Firefox browsers.
I can also reproduce this problem on a computer in the Chrome browser. Under normal conditions, the modal window behaves correctly, but when I switch to a mobile device, it stops closing.
from react-modal-sheet.
same problem, any news on this issue?
from react-modal-sheet.
Hello everyone, I encountered the same problem, in my case I removed the Header, and wanted to make my own, but on mobile I encountered a problem that the panel did not collapse, but only jumped slightly from top to bottom. The solution turned out to be quite simple, I added the draggable={false} attribute to my own Header (which is not located at the top of the hierarchy), and everything began to work as expected
from react-modal-sheet.
same problem, any news on this issue?
Not really. I did a workaround
from react-modal-sheet.
Hi @Knaackee 👋
The Scroller
component works so that it enables the drag gestures only when the scroller is either at the top or at the bottom. If the user is scrolling the content the sheet body is not draggable as there is really no way to distinguish between scrolling and dragging.
Is the problem that the sheet is not draggable at the top/bottom positions? That would be a bug.
Does this example demo work for you? At least on my iPhone it works nicely: sheet is dragged down from body area when the sheet is not scrolled and when the sheet scroller is scrolled all the way to bottom the sheet can be dragged upwards.
from react-modal-sheet.
Same here. More precisely, on android :
- with draggable=both, on Firefox, when the content is not high enough to require scroll, the drag action closes the modal. But does not close when the content requires scroll
- on chromium (bromite, kiwi), it can never be closed with a scroll
from react-modal-sheet.
Would gladly help, but I'm a bit lost, the code is more complicated than I thought :)
from react-modal-sheet.
Mmmh, found something interesting ! On chrome mobile (well at least Bromite and Kiwi), drag works... with two fingers !
On chromium desktop in mobile dev mode, shift + drag works too (simulates two fingers).
Can also confirm that using two fingers solves the problem for firefox when content height -> scroll.
with draggable=both, on Firefox, when the content is not high enough to require scroll, the drag action closes the modal. But does not close when the content requires scroll
from react-modal-sheet.
First I tried to resolve this by setting "overflow:hidden" when the user started to drag. But it doesn't work.
Now trying to use the "touch-action" css prop thanks to this issue and getting interesting results, though not good enough yet. I'm trying things on the lib locally in my repo laem/cartes@a0e2377
from react-modal-sheet.
Unfortunately, firefox and safari do not support "pan-down"...
Edit : I implemented a small hook to detect the direction of the pan.
from react-modal-sheet.
It's not ideial but I'm using this to prevent the page from refreshing:
useLayoutEffect(() => {
if (isOpen) document.querySelector('body')!.style.overscrollBehavior = 'none'
return () => {
document.querySelector('body')!.style.overscrollBehavior = 'unset'
}
}, [isOpen])
I think it will still take a moment for users to figure out how to close it, but I also have snapPoints={[0.85]}
so there's a nice inviting touchable area.
from react-modal-sheet.
Hi, from what I tested https://github.com/emilkowalski/vaul tackles this behavior on chrome correctly, maybe we could get some inspiration from them.
from react-modal-sheet.
Related Issues (20)
- Allow style with Tailwind with className prop HOT 2
- initialSnap -34px bug HOT 2
- How do I implement a sticky footer? HOT 2
- Customer Header breaks dragging behavior
- Stacking sheets HOT 1
- TypeError: undefined is not an object (evaluating 'scrollable.scrollTop') HOT 1
- prevent Closing component HOT 2
- Bug on Safari Mobile, when switching the address bar up HOT 1
- Bug: Mobile Safari input inside sheet stays behind when sheet moves HOT 4
- Bug: page overflow when mobile on screen keyboard is active (chrome) HOT 1
- Break tree shaking issue because of a "motion" HOT 3
- Close the sheet, but the component remains mounted with opacity 0. HOT 1
- Drag functionality with Scroller HOT 1
- Project Still Maintained? HOT 1
- There is no renderBackdrop prop.
- Sheet is too slow at iPhone
- Everthing is working but getting some 31 warnings what are these warnings HOT 1
- Sheet disappears after few closings on iOS HOT 1
- Incompatibility with react 19
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 react-modal-sheet.