-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
outerHeight(true) does not handle negative margins properly (starting with 3.3.x release) #3982
Comments
The problem seems to be that |
mgol
added a commit
to mgol/jquery
that referenced
this issue
Mar 30, 2023
This regressed in jquerygh-3656 as the added logic to include scroll gutters in `.innerWidth()` / `.innerHeight()` didn't take negative margins into account. This broke handling of negative margins in `.offsetHeight( true )` and `.offsetWidth( true )`. To fix it, calculate margin delta separately and only add it after the scroll gutter adjustment logic. Fixes jquerygh-3982 Ref jquerygh-3656
2 tasks
PR: #5234 |
mgol
added a commit
that referenced
this issue
Apr 4, 2023
This regressed in gh-3656 as the added logic to include scroll gutters in `.innerWidth()` / `.innerHeight()` didn't take negative margins into account. This broke handling of negative margins in `.offsetHeight( true )` and `.offsetWidth( true )`. To fix it, calculate margin delta separately and only add it after the scroll gutter adjustment logic. Fixes gh-3982 Closes gh-5234 Ref gh-3656
mgol
added a commit
that referenced
this issue
Apr 4, 2023
This regressed in gh-3656 as the added logic to include scroll gutters in `.innerWidth()` / `.innerHeight()` didn't take negative margins into account. This broke handling of negative margins in `.offsetHeight( true )` and `.offsetWidth( true )`. To fix it, calculate margin delta separately and only add it after the scroll gutter adjustment logic. Fixes gh-3982 Closes gh-5234 Ref gh-3656 (cherry picked from commit bce13b7)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
outerHeight(true) does not handle negative margins properly (starting with 3.3.x release). This was working fine in 3.2.x.
3.2.1: https://jsfiddle.net/b1mtv4ts/12/
3.3.1: https://jsfiddle.net/b1mtv4ts/13/
The text was updated successfully, but these errors were encountered: