Skip to content

Dimensions: Include scroll gutter in "padding" box #3656

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

Merged
merged 4 commits into from
Jun 19, 2017

Conversation

gibson042
Copy link
Member

@gibson042 gibson042 commented May 4, 2017

Fixes gh-3589

Summary

Per spec, a scrollbar gutter is excluded from content dimensions. But we want to include it in .innerWidth/.innerHeight/.outerWidth/.outerHeight, and therefore must calculate it from other data.

I also renamed functions and variables for clarity (but kept that work in its own commit for easier reviewing).

It's surprisingly big:

   raw     gz Sizes
269640  80000 dist/jquery.js
 86921  30123 dist/jquery.min.js

   raw     gz Compared to master @ b3defccdc0ca93b49647e79df5e70fb933af679c
  +708   +209 dist/jquery.js
  +139    +36 dist/jquery.min.js

Checklist

Sorry, something went wrong.

@mention-bot
Copy link

@gibson042, thanks for your PR! By analyzing the history of the files in this pull request, we identified @jeresig, @brandonaaron and @dmethvin to be potential reviewers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

.innerWidth(), .innerHeight() mishandling scroll bars in 3.2.x
3 participants