-
Notifications
You must be signed in to change notification settings - Fork 5k
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
Semantic UI broke down scrollTop() #1509
Comments
Oh, I'm sorry. But in my current project... After removing |
Are you using the latest SUI? Most likely its from html {
overflow-x: hidden;
} which was in an older version of sidebar. |
OMF... It was my own mistake. Say sorry again. Thanks a lot! |
Oh no, I just forgot why I added All code to do that is as following: html, body {
max-width: 100%;
overflow-x: hidden;
} via http://stackoverflow.com/questions/17756649/disable-the-horizontal-scroll It doesn't break down scrollTop(). But when meets Semantic UI... Everything messes up. Fortunately, I finally found a solution. I just moved the two lines of code above into But I think that... Disabling the horizontal scroll is a MUST on any mobile devices. It should be done by Semantic UI as default. And Semantic UI should not break down scrollTop(). There is an alternative way I found to solve the problem, but I'm not sure if this will introduce any new bugs: html, body {
// note: there is no `height: 100%;` !
min-height: 100%;
max-height: 100%;
max-width: 100%;
overflow-x: hidden;
} Just replace |
I found that the latest Semantic UI detects whether the device is running iOS, and if it's true then apply these code: @media only screen and (max-width: 992px) {
html.ios {
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
} These code may work fine on any iPhone (except that it needs time to take effect as JavaScript runs a bit slower than CSS). But on iPad with landscape mode, you can still scroll the page horizontally. Because the media query is limited to |
You lose a lot by adding I haven't noticed the issues with iPad in horizontal layouts. Can probably take out the mediaquery around the ios css rule. |
I'm a bit confused by this issue because I'm still seeing the |
I tried getting scroll position but it always returns 0.
I found that it's because Semantic UI had set
height: 100%;
onhtml
andbody
.http://stackoverflow.com/a/12789956/2228929
Why? What does this code do?
Or is there any workarounds without removing the
height: 100%;
?The text was updated successfully, but these errors were encountered: