Skip to content
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

[Sidebar] Sidebar in iOS #4264

Closed
LarsBuur opened this issue Jul 11, 2016 · 8 comments
Closed

[Sidebar] Sidebar in iOS #4264

LarsBuur opened this issue Jul 11, 2016 · 8 comments

Comments

@LarsBuur
Copy link

Continuing on issue #2087 (currently closed)

Using the example from @Eliasvdb the output from the fiddle is this url:
http://fiddle.jshell.net/dzm8b28s/show/

The problem is that if you try to display that specific page in either iOS simulator or in safari on iOS then the height of the sidebar is only the height of the content - and the rest is hidden. Please see this image as an illustration.
screen shot 2016-07-11 at 08 26 31
I have tried to add this css (from the sidebar docs).

html.ios {
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}
html.ios,
html.ios body {
  height: initial !important;
}

it is not clear from the docs (to me) if I manually should add the userAgent detection any ideas how this could be resolved?

@LarsBuur
Copy link
Author

Please also see latest note on #3701

@AndrewMDuke
Copy link

I am also having this issue.

So far i have tried to add the CSS above, but from the documentation i feel that this is already included in the Semantic Ui CSS file. I have also experimented with height values for the sidebar, body and pusher div without any luck.

Have you had any luck finding a solution Lars?

@jlukic jlukic added this to the 2.2.3 milestone Jul 24, 2016
@subotkevic
Copy link

subotkevic commented Jul 31, 2016

Same problem, but I have solved it.

Basically, Semantic UI says that you need to add something like:
html.ios, html.ios body { height: initial !important; }

But instead of code above, you should add this one:
html.ios, html.ios body { height: 100% !important; }

The problem with that first code is that it sets html height to initial and after that it sets body height to initial... But what we really need is to set html and body height to 100%.

And the main problem is that Semantic UI includes "bad styles" by default, so you need to override them.

All in all, this solution works.

@jlukic
Copy link
Member

jlukic commented Aug 15, 2016

Sidebar detects ios in its initialization code and automatically adds class ios to html.

I think I have a fix, but will have to verify it's all safe when i'm able to debug on my phone later this week.

@jlukic jlukic modified the milestones: 2.2.3, 2.2.4 Aug 22, 2016
@LarsBuur
Copy link
Author

Bugger. Was hoping for this one in 2.2.3. Anything I can do to test your fix @jlukic ?

@arggh
Copy link

arggh commented Sep 26, 2016

@jlukic Any updates on this? What's the proposed fix?

@pzi
Copy link

pzi commented Oct 5, 2016

Fwiw, you can replicate the issue by going to any page on the Semantic UI site in iOS Safari, remove .main.ui.intro.container and .ui.black.inverted.vertical.footer.segment and you will get the following when opening the sidebar:

image

@jlukic jlukic modified the milestones: 2.2.5, 2.2.6, 2.2.7 Oct 28, 2016
@jlukic jlukic changed the title Sidebar in iOS [Sidebar] Sidebar in iOS Feb 20, 2017
@jlukic
Copy link
Member

jlukic commented Feb 20, 2017

I dont believe the height rules are necessary in the iOS fix anymore. The overflow rules however I can confirm are still very necessary, removing them will cause the bottom/top of sidebar to get cutoff due to the way iOS auto resizes document height when sidebar is visible.

Fixed in 2.2.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants