Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Width and height functions are no longer symmetric for scrollable elements since 3.2.0 #4255
In jQuery 3.0.0 the width and height functions were changed to respect things like css zoom. This change ended up being reverted in 3.1.0.
Then in 3.2.0 the width and height functions were changed to return the width/height without scrollbars (clientWidth/clientHeight). This too has broken the symmetry of the API:
Is this a bug?
Is there a way to get the old value?
Also the API (http://api.jquery.com/width/) states:
That doesn't seem to be true, because setting box-sizing to border-box causes it to ignore the scrollbars, essentially reverting to the old behaviour:
Link to test case
Thanks for opening an issue. There have already been some changes made to dimensions on the master branch. The scrollbars are ignored in
Ugh, I am so sick of these scrollbar-related dimensions issues. What's happening here is that in the affected (i.e., non-Firefox) browsers, elements with
I'd like to make it so that jQuery
Resulting relationship with the CSS box model:
Maybe someday we'll find a way to properly deal with scrollbars, but right now I'm ready to just give up.