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

Fix offset calculation in hover box. #105

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

All-less
Copy link

@All-less All-less commented May 8, 2019

Currently, the offset of a hover box is calculated based on offsetLeft and offsetTop. However, both attributes are relative to the parent, so the citations and footnotes in a table (or other nested elements) may be placed incorrectly.

original

This patch calculates the offset by recursively adding up the offsets of parents. Now the hover boxes appear at the right place.

fixed

@colah
Copy link
Member

colah commented May 8, 2019

Gosh! Thank you for the lovely PR. GIFs in the description is lovely.

I'll defer to @ludwigschubert on code review, just wanted to comment because you'd handled that so nicely. :)

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 this pull request may close these issues.

2 participants