antiscroll does not work with chrome Version 25.0.1323.1 dev #40

Merged
merged 1 commit into from Feb 25, 2013

Conversation

Projects
None yet
7 participants
Contributor

pirxpilot commented Nov 19, 2012

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.

Change scrollbar width calculation
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.

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' class
applied. 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.

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

Contributor

Radagaisus commented Feb 22, 2013

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

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

Ping @LearnBoost

Contributor

pirxpilot commented Feb 25, 2013

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.

rauchg added a commit that referenced this pull request Feb 25, 2013

Merge pull request #40 from pirxpilot/chrome-25-issues
antiscroll does not work with chrome Version 25.0.1323.1 dev

@rauchg rauchg merged commit 5e5639f into Automattic:master Feb 25, 2013

Contributor

rauchg commented Feb 25, 2013

Thanks so much guise

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;
}

Contributor

davemckenna01 commented Feb 26, 2013

The problem still persists in Chrome 25 on Lion.

Contributor

davemckenna01 commented Feb 26, 2013

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;
}

@davemckenna01 do you have a PR with the changes?

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

Contributor

davemckenna01 commented Feb 26, 2013

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.

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