You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Essentially a markdown code block that is initially hidden in some way will end up with invalid dimensions once it is un-hidden. In my example, it's the <details> element, but seems similar in the linked issues. The problem is resolved when the browser window is resized.
I took a quick peek and the dimensions seem to be calculated in this hook, but I haven't looked deeper into why these calculations may be taking invalid values.
If anything jumps out to anyone, let me know. I may be able to find some time to look deeper at this.
The text was updated successfully, but these errors were encountered:
Thanks for reporting and collecting all the links.
The workaround is to make sure that the component re-renders when the visibility change. In the details example that would be wrapping the code in a div, listening to the open event, and changing the key of the wrapper when the visibility changes.
I have an idea of how to fix it in Code Hike with a ResizeObserver, I'll give it a try today.
NaN
set aswidth
in docusaurus tabs #279Screenshot
Essentially a markdown code block that is initially hidden in some way will end up with invalid dimensions once it is un-hidden. In my example, it's the
<details>
element, but seems similar in the linked issues. The problem is resolved when the browser window is resized.codehike/packages/mdx/src/smooth-code/use-dimensions.tsx
Line 245 in 52738ce
I took a quick peek and the dimensions seem to be calculated in this hook, but I haven't looked deeper into why these calculations may be taking invalid values.
If anything jumps out to anyone, let me know. I may be able to find some time to look deeper at this.
The text was updated successfully, but these errors were encountered: