Automattic / antiscroll

OS X Lion style cross-browser native scrolling on the web that gets out of the way.
1.07k stars 162 forks source link

antiscroll does not work with chrome Version 25.0.1323.1 dev #40

Closed pirxpilot closed 11 years ago

pirxpilot commented 11 years ago

Antiscroll stopped working properly in Chrome v25 (it's still in dev channel). For some reason native scrollbars are displayed under the antiscroll generated scrollbars. The browser behaves as if ::scrollbar pseudo class styles (setting scrollbar width/height to 0) were ignored.

antiscroll in chrome v25

I am not really sure what's causing that, but when trying to investigate the problem I realized that scrollbarSize did not work properly in Chrome. It was returning 0 and not the native scrollbar width.

We now calculate the size in the container with 'antiscroll-inner' classapplied. If ::scrollbar CSS is applied properly the width is 0, and we don't have to hide native scrollbars manually. Otherwise scrollbars are hidden by adjusting .antiscroll-inner size.

That fixes Chrome v25 issue.

JacekLach commented 11 years ago

Chrome 25 just went live, and this issue is still present.

Radagaisus commented 11 years ago

@pirxpilot commit fixed the problem. Tested it cross browser and it's good. Can we get this merged?

internalsystemerror commented 11 years ago

Thanks @pirxpilot, I'm now using your branch until this gets fixed ;).

Ping @LearnBoost

pirxpilot commented 11 years ago

I just checked and it still merges cleanly. In the meantime, if you need all the latest and greatest antiscroll and fix for #40 just use pu-chrome-25 branch.

internalsystemerror commented 11 years ago

@pirxpilot tx

rauchg commented 11 years ago

Thanks so much guise

internalsystemerror commented 11 years ago

tx :D

epitrochoider commented 11 years ago

I put my this in my css to fix the problem, instead of changing the js.

/Fix to Chrome v25 scrollbar problems./ .box-wrap ::-webkit-scrollbar { width: 0px; height:0px; }

davemckenna01 commented 11 years ago

The problem still persists in Chrome 25 on Lion.

davemckenna01 commented 11 years ago

Thanks @epitrochoider that did the trick!

It might be a better idea to have it in the library css file though. This is what I added to antiscroll.css :

.antiscroll-wrap ::-webkit-scrollbar { width: 0px; height:0px; }

internalsystemerror commented 11 years ago

@davemckenna01 do you have a PR with the changes?

davemckenna01 commented 11 years ago

@internalsystemerror indeed I do! https://github.com/LearnBoost/antiscroll/pull/47

internalsystemerror commented 11 years ago

I've tested on windows chrome and all's still fine :).

davemckenna01 commented 11 years ago

Great :) Thanks - this was a weird one - I should let the chrome devs know about this. Something must be wrong with how they're parsing css under the hood.