-
-
Notifications
You must be signed in to change notification settings - Fork 79.1k
Modal background scrollable (iOS Safari) #22311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
To my knowledge there's no good solution for this issue. You'll end up making messy compromises. Even modals in Bootstrap v3 allow the background to scroll when a modal is open. |
Ok I see. Thank you. |
Sorry @SebastianSchenk but I reopen your issue because we have to note that's a bug browser in our documentation |
Hi - have used the bootstrap modal to create a form pop up in our plugin Contact Us page Contact People and the Premium Version. Love the script - but we are seeing bug in iOS - which is the bug raised in this issue. The Modal pop opens a contact form from the profile card on the plugin - The issue we are having is scroll in Mobile with iOS regardless if using Safari or Chrome browser Have made a video to show the issue When touch swipe if the finger lands on area between input fields on the form modal scrolls fine - but if the finger lands on an input field the modal don't scroll - the background does. For a user this is very bad UX - for a user they do not know that is the issue - like we didn't until we figured it out. We see this issue with Chrome on iOS as well as safari |
Is there any workaround to this? |
we are facing the same issue for IOS 10.3 and for latest version iPhone of IOS it's working fine |
You can write a listener for touchMove and stopPropagation on that event which will only scroll the modal. |
Please check this solution for fluid scroll of modal only, fixed background, iOS Safari: https://github.com/radogado/bootstrap-modal-ios |
@radogado doesn't work for me on iphone 5 iOs 10, 11 |
@sinneren on iPhone 5 iOS 10 landscape, there is a bug with the top Safari toolbar. Is this the problem you experience? Thanks. |
@radogado I use both iPhones with 10 and 11 iOS. And after including your css and js the background is still scrollable :( I tried many solutions, with fixed position, with android css property, and many others... and I have no padding right of modal... why we don't have only android in this world :D |
@sinneren Please try the demo first, not your app, because I tested it and it works. Thanks! https://radogado.github.io/bootstrap-modal-ios/ |
@radogado don't know if this demo is intended to work on desktop, but on desktop the large modal is not scrollable at all |
@SebastianSchenk it is scrollable on desktop, except in Chrome 67 for Mac, which has a known bug, fixed in 68 beta. Which OS/browser are you testing? Thanks. |
@radogado Tried again include your script. In second try portrait works fine. But landscape has scrolling 50\50 |
@sinneren does the demo have the same problem? Trying to figure out if the problem is integration or the original script. What does 50/50 mean – sometimes the modal scrolls and sometimes not? Thanks. |
@radogado demo hasn't content at first. Then, nothing to affect for it on my integration. On demo I'm not seen it. 50\50 means is in half of cases I reproduce issue. Just for information. I like option just with portrait orientation. |
@radogado yes, was using Chrome 67 for Mac |
I've soluted this problem using just JavaScript in the following gist: You can also use CSS for the styling, but I intentionally went for a solution in 1 place. This may help others out here aswell. |
This work for me on ios 12 and iPhone 6s: vuetifyjs/vuetify#5207 Add: |
Add to html: |
@kuongknight do you add this to the css of the modal or the parent body? |
@pretty No |
any update on this? |
this solution works |
@vkalach Or just only add them to |
I'll reference this comment I left on a similar issue - as it mentions a potential fix, that I came across on Stack Overflow. |
@xenogew |
if only Safari supported https://caniuse.com/#feat=mdn-css_properties_overscroll-behavior |
Dug into this again—apparently this was fixed with iOS 13! See #20803 and the bug report https://bugs.webkit.org/show_bug.cgi?id=158342. Our iOS supported versions are 10+, so there's some risk in bringing back the Do folks think it's worth it? |
Closing out as wildly stale. 😬 |
This issue was still present > not directly link to bootstrap but a more global IOS issue. for people who need a solution until safari on IOS 16 better adoption (https://caniuse.com/mdn-css_properties_overscroll-behavior) : JS :
Css :
|
System
iOS 10.2 (iPad Mini 3)
Browser
iOS Safari
Test case
https://v4-alpha.getbootstrap.com/components/modal/#live-demo
Description
When opening a modal in any other browser than iOS Safari, the background isn't scrollable; neither by mouse wheel nor by touch.
On iOS Safari the background is scrollable, which shouldn't be the case as far as i know.
The text was updated successfully, but these errors were encountered: