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

cssvwunit feature detection broken on Firefox in the presence of a scrollbar #1045

Closed
rjgotten opened this Issue Sep 25, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@rjgotten

rjgotten commented Sep 25, 2013

Firefox bases the width of the vw unit on the viewport minus any scrollbars. This corresponds to document.documentElement.clientWidth and not window.innerWidth as the cssvwunit test is currently using.

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented Oct 23, 2013

Hey @rjgotten, I was not able to replicate this. When I checked this in Firefox 24 on Windows and OS X, the numbers are identical. Could you let us know more about the case you are running into? A specific browser and OS version, and a jsfiddle would be amazing

@rjgotten

This comment has been minimized.

rjgotten commented Oct 23, 2013

Hey @rjgotten, I was not able to replicate this. When I checked this in Firefox 24 on Windows and OS X, the numbers are identical.

That would be because your testcase is incorrect; the codepen sample does not include a vertical scrollbar.
This issue only occurs when a vertical scrollbar is present.

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented Oct 23, 2013

Not sure what you mean, there is a vertical scrollbar

image

@rjgotten

This comment has been minimized.

rjgotten commented Oct 24, 2013

Your test is still broken.

The vertical scroll bar is not yet present before the first paint, which means as long as the Modernizr test runs before first paint you will not see the problem.

Add something like:

:root {
  overflow-y : scroll;
}

to force the vertical scrollbar to always be present and you'll see the difference pop up.

@patrickkettner

This comment has been minimized.

Member

patrickkettner commented Oct 24, 2013

Ah, how silly of me. Thank you for your persistence :]

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