Skip to content
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

Lightning Inspector root element is not offset correctly #426

Closed
chiefcll opened this issue Oct 26, 2022 · 0 comments · Fixed by #427
Closed

Lightning Inspector root element is not offset correctly #426

chiefcll opened this issue Oct 26, 2022 · 0 comments · Fixed by #427

Comments

@chiefcll
Copy link
Contributor

chiefcll commented Oct 26, 2022

This PR
477060e

Lightning components in a body tag with an offset (such as in Storybook) don't get the correct left + top offsets. This leads to all divs being off by whatever the body tag is offset by. I think this is because contentRect is not returning the true left and top offset like getBoundingClientRect. I think the easy fix is line 207 should be:
updateRootStyleFromCanvas(entries[0].target.getBoundingClientRect());
And that fixes the issue.

Current Issue: Not getting Left + Top correctly
Screen Shot 2022-10-25 at 10 40 28 PM

chiefcll pushed a commit to chiefcll/Lightning that referenced this issue Oct 26, 2022
@frank-weindel frank-weindel linked a pull request Oct 26, 2022 that will close this issue
erikhaandrikman added a commit that referenced this issue Oct 31, 2022
update lightning inspector root div offset - Fixes #426
g-zachar pushed a commit that referenced this issue Mar 11, 2023
update lightning inspector root div offset - Fixes #426
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant