-
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
Dimensions: Add offset prop fallback to FF for unreliable TR dimensions #4808
Dimensions: Add offset prop fallback to FF for unreliable TR dimensions #4808
Conversation
Firefox incorrectly (or perhaps correctly) includes table borders in computed dimensions, but they are the only one. Workaround this by testing for it and falling back to offset properties Fixes jquerygh-4529
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Support tests are coming back! Logic looks good to me, I just hope we can limit the size increase a bit. Some of it is expected, modifying an existing test is cheaper than creating a new one when there's none at the moment.
I added some comments.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just one doubt about a comment. Thanks! 🙂
// Support: IE 10 - 11+ | ||
// IE misreports `getComputedStyle` of table rows with width/height | ||
// set in CSS while `offset*` properties report correct values. | ||
// Support: Firefox 70+ | ||
// Firefox includes border widths | ||
// in computed dimensions for table rows. (gh-4529) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Back when we had lots of support comment, when code was guarded by one, we usually didn't comment what gets worked around as the support comment above the support test was explaining that anyway. Maybe we can remove this comment in that case here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although, I see we have a similar comment on 3.x-stable
here so I'm fine either way.
Fixes gh-4529
Summary
Firefox incorrectly (or perhaps correctly) includes table borders in computed
dimensions, but they are the only one. Workaround this by testing for it and
falling back to offset properties.
This applies to latest FF and so needs to go on master as well.
Checklist
+203 bytes