-
Notifications
You must be signed in to change notification settings - Fork 844
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
[EuiResizeObserver, EuiBottomBar] Account for padding and border #4909
Conversation
top, | ||
bottom, | ||
left, | ||
right, |
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.
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.
Oh hmm. I figured border would also be part of the top
, left
, etc. data.
I'll update to just use getBoundingClientRect()
instead, which is (I think) how it used to work.
Preview documentation changes for this PR: https://eui.elastic.co/pr_4909/ |
Preview documentation changes for this PR: https://eui.elastic.co/pr_4909/ |
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.
👍 Thanks for jumping on this one so quickly. I checked the docked flyout and bottom bar usages in Chrome, Safari and Firefox. All fixed!
Preview documentation changes for this PR: https://eui.elastic.co/pr_4909/ |
Summary
Fixes #4907, in which it was discovered that height and width from
clientRect
do not include padding or border (DOM box model).This removes reliance on
clientRect
data and usesgetBoundingClientRect
instead.Checklist
- [ ] Check against all themes for compatibility in both light and dark modes- [ ] Checked in mobile- [ ] Props have proper autodocs and playground toggles- [ ] Added documentation- [ ] Added or updated jest tests- [ ] Checked for accessibility including keyboard-only and screenreader modes