Skip to content
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

Why scrollWidth and offsetWidth? #109

Closed
krmgns opened this issue Jan 1, 2013 · 1 comment
Closed

Why scrollWidth and offsetWidth? #109

krmgns opened this issue Jan 1, 2013 · 1 comment

Comments

@krmgns
Copy link

krmgns commented Jan 1, 2013

If I'm wrong, please correct;

If looking for document height, then seems something wrong width this line (cos it gives same result with width).

https://github.com/ded/bonzo/blob/master/bonzo.js#L858

Test: var dims = bonzo(document).dim(); console.log(dims.width, "x", dims.height)
Output: 1263x1263

Math.max(el.body.scrollHeight, el.body.offsetHeight, de.scrollWidth, de.offsetWidth, de.clientHeight)

And, I think it shold be like;

Math.max(el.body.scrollHeight, el.body.offsetHeight, de.scrollHeight, de.offsetHeight, de.clientHeight)

@rvagg
Copy link
Collaborator

rvagg commented Jan 2, 2013

ooops! my bad; nicely picked up. Fixed in 258deda

@rvagg rvagg closed this as completed Jan 2, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants