siema
siema copied to clipboard
Incorrect window size on initital load
I am using Siema to create a carousel structure. On the initial load, the width is set incorrectly due to which part of the content goes into overflow. However, if I perform any action that triggers a window resize (such as maximize or even opening dev tools), the width gets adjusted properly to the window size. Also works if I manually execute the window.dispatchEvent(new Event('resize')) event via the console. Why does it not work on the initial load then?
Could you recreate on codepen please? I am assuming it may be something specific to your project :( Please try to recreate and I will be happy to assist.
I have exactly the same issue but I assume @pawelgrzybek is right and this is something related to the layout. The root cause is that the main div is set to the width = 0.
@Drishh101 what was the problem in your case?