yash-goli / jquery-nicescroll

Automatically exported from code.google.com/p/jquery-nicescroll
0 stars 0 forks source link

overflow-x:hidden kills nicescroll #48

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If the CSS property "overflow-x:hidden" is added to the <body> tag: 

Firefox:
The normal vertical scrollbar appears in addition to the nicescroll vertical 
scrollbar and scrolling the nicescroll scrollbars has no effect.

IE10:
The normal vertical scrollbar appears and no nicescroll scrollbar appears.

I use jQuery 1.10.2 and nicescroll 3.4.0

(what I try to do is disabling horizontal scrolling at all, NO horizontal 
scroll bar! I realized that horizrailenabled:false brings up the default 
vertical scrollbar so I tried it with style="overflow-x:hidden"...)

Original issue reported on code.google.com by einemAnd...@gmail.com on 25 Sep 2013 at 8:39

GoogleCodeExporter commented 9 years ago
I noticed that this only happens if the body has also style="height:100%", 
without that, "overflow:hidden" seems to work fine - at least in IE10, in 
firefox I can't do vertical scrolling(!) when I don't set style="height:100%" 
to the body...

Original comment by einemAnd...@gmail.com on 25 Sep 2013 at 9:36

GoogleCodeExporter commented 9 years ago
OK, I found a workaround:
set style="height:100%" to the <html> tag and applying nicescroll to the <body> 
and not to the <html> tag ($("body").niceScroll({horizrailenabled:false});).
No problem with Firefox, IE or overflow-x... still it's strange that it didn't 
work in the first place.

Original comment by einemAnd...@gmail.com on 25 Sep 2013 at 10:23