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

Incorrect window size on initital load #291

Open
Drishh101 opened this issue Jun 30, 2022 · 2 comments
Open

Incorrect window size on initital load #291

Drishh101 opened this issue Jun 30, 2022 · 2 comments

Comments

@Drishh101
Copy link

Drishh101 commented Jun 30, 2022

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?

@pawelgrzybek
Copy link
Owner

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.

@kbeat
Copy link

kbeat commented Sep 6, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants