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 height calculation in fits function for inline elements #191

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

totaltrece
Copy link

@totaltrece totaltrece commented Dec 2, 2021

Hi, this pull request solves a problem encountered when applying dotdotdot on line elements in the fits function. It always returned zero as the height of the element so it always returned true and did not truncate it. The solution has been to take the maximum of the different types of element height as does the jquery innerHeight function used in the previous version:

https://github.com/jquery/jquery/blob/main/src/dimensions.js

I have also fixed two typing that made the code not compile.

Thanks for this very useful code!

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