-
Notifications
You must be signed in to change notification settings - Fork 14
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
Modals don't play well with safari on iOS #7
Comments
Hmm, that's weird. From what I've noticed, it also does weird stuff with the Firefox URL bar on mobile (Android). That's mostly coming from the UI library SMUI. Does this same behavior happen in the demo pages from SMUI? https://sveltematerialui.com/demo/dialog (fullscreen dialog demo is almost at the bottom) |
That demo appears to work as expected on mobile. But the modal in the screenshots is not, if I remember correctly, a full screen modal. We've finished our trip and so we're not actively using splitio any more. I can't figure out how to recreate that modal screenshot off the top of my head any more unfortunately. |
The balances dialog is fullscreen, but SMUI shows these as such only on mobile, not desktop. I can't seem to find the culprit really, maybe I should make some test projects and submit an issue to SMUI directly. :( |
Ah, sorry, right, now I realise what this issue was all about. It's the X top left that's hidden. I was mislead by my own blacking out in the screenshots! 🙈 Okay, looking at this again, the demo modal works exactly right, but the Balances modal doesn't. Now that I filled the box with more content (I added 12 dummy users), I still have the same behaviour. The heading "Balances" behaves just like the "Terms and Conditions" header on the demo. The most obvious difference is that the demo modal also has a bottom bar, while the Balances modal does not. A quick & dirty workaround would be to add a "Close" button to the bottom of the modal, which should always be visible, even on iOS. Otherwise, could it be a version issue? Or, maybe there's some javascript missing on splitio? I've seen this type of issue in UI frameworks where some redraws have to be triggered by javascript, so if you're loading just the CSS from the framework that's not enough. I don't know enough about Svelte to know if that could be an issue here or not. I'm thinking of something like the bootstrap days, where you need to include both Otherwise, I'm out of ideas! |
Do you mean that the demo also has the top title hidden/bugged? In that case that's a relief 😅 Or maybe I'm misunderstanding something. If it works well with a bottom "Close" button that seems like the simplest fix, will add it then |
Here's what it's mean to to look like:
But here's what it often looks like:
Note the bottom bar which changes size. It's a bit tricky on iOS because the viewport height changes. Trouble is, the modal often opens in the second state where the X in the top left is off the screen. Given that the whole thing doesn't scroll, it's not reachable. The only way to escape the view is by hiding the toolbar at the bottom. But that's a pretty advanced level move, I'd assume that most regular humans would just get stuck here and have to reload the whole page. Bit of a nasty UX bug, and unfortunately I'm not 100% sure what the solution is. I'd guess there's probably some libraries that handle this, or maybe it needs a resize event handler to resize the modal. Or maybe there's an easy way to make the modal always ~50px shorter than the viewport?
The text was updated successfully, but these errors were encountered: