siema icon indicating copy to clipboard operation
siema copied to clipboard

Incorrect window size on initital load

Open Drishh101 opened this issue 2 years ago • 2 comments

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?

Drishh101 avatar Jun 30 '22 01:06 Drishh101

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.

pawelgrzybek avatar Jun 30 '22 08:06 pawelgrzybek

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?

kbeat avatar Sep 06 '22 12:09 kbeat