-
Notifications
You must be signed in to change notification settings - Fork 30
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
Sporadic formatting issues (rendered text too narrow) #1702
Comments
At least in our repo, think we can get around it by setting the following property explicitly?
Testing with |
Interesting, thanks for reporting this. Are you using the pre-release versions? Which browsers have you found the issue on? |
Chrome, at least in terms of what folks were reporting. Not using any pre-release versions. Was using |
Released |
Absolutely will do, thanks!! |
I guess this is probably the culprit: littlefoot/src/dom/footnote.ts Line 99 in 0ca530e
|
goblindegook#1702 If the page is resized before any footnotes have been opened, the `resize` action can compute a very small `max-width` based on zero size footnote contents. This was allowed to happen because `isMounted` always returns true after the popover element is created but not yet shown. - `isMounted` now checks whether the popover is contained in the DOM. - `createElementFromHTML` now unwraps newly created elements to improve robustness in case `parentElement` gets used elsewhere.
I am able to reproduce the issue with these steps:
Resizing the page causes this to run: littlefoot/src/dom/footnote.ts Lines 96 to 101 in d709002
The code computes a very small This should be gated by littlefoot/src/dom/footnote.ts Line 25 in d709002
Because of the way elements are created during littlefoot setup, littlefoot/src/dom/document.ts Lines 48 to 51 in d709002
|
Thanks for investigating the issue! |
#1702 If the page is resized before any footnotes have been opened, the `resize` action can compute a very small `max-width` based on zero size footnote contents. This was allowed to happen because `isMounted` always returns true after the popover element is created but not yet shown. - `isMounted` now checks whether the popover is contained in the DOM. - `createElementFromHTML` now unwraps newly created elements to improve robustness in case `parentElement` gets used elsewhere.
Occasionally (very difficult to reproduce), we've noticed the footnote content rendering very narrowly (in a way that doesn't quite match the container).
The text was updated successfully, but these errors were encountered: