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 Truncate component on window load #69

Merged
merged 1 commit into from
Apr 27, 2022
Merged

Conversation

popoplanter
Copy link
Contributor

The truncate component does not always calculate correctly since sometimes we need to wait for the JS to load to get correct font position/size/... This PR adds a trigger on load to prevent these issues.

The truncate component does not always calculate correctly since sometimes we need to wait for the JS to load to get correct font position/size/... This PR adds a trigger on load to prevent these issues.
@luca-rath
Copy link
Contributor

This additional event listener definitely doesn't hurt anyone, therefore I'm fine with merging this. But I don't think it fully fixes your issue, because the load listener might trigger before all the fonts are loaded.

@popoplanter
Copy link
Contributor Author

@luca-rath i dont know if the font loading was the issue back then. if we can catch most other issues with the load listener thats fine for now and if we run in to any more problems we can still try to fix them later on.

@luca-rath luca-rath merged commit 2e62167 into sulu:master Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants