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
Is your feature request related to a problem? Please describe.
I put off updating for a bit because my tests where broken on anything after 7.0.0. After digging into it I realized it was due to some rendering differences. Tests were expecting desktop HTML output while mobile was being outputted . Then after further investigation I realized that window.innerWidth was set to 0 and that was what was causing the issue.
I found the your notes about setting the innerWidth via window.happyDOM.setInnerWidth() which I am now forced to call in my setup file.
Describe the solution you'd like
I would like to see innerWidth by default set to 1024. Window.screen has width at 1024 currently, so I think it makes sense to match that. If people want to work on a different screen size they could still set it manually.
Describe alternatives you've considered
I would really consider any other screen size that is within the "desktop" size.
The text was updated successfully, but these errors were encountered:
I have looked into it and I agree with you. It was a mistake to set it to "0" by default.
It seems like JSDOM are setting the resolution to 1024x768 and it makes sense to use the same value in case an app changes between the libraries, but also to be compatible with older versions of Happy DOM.
Is your feature request related to a problem? Please describe.
I put off updating for a bit because my tests where broken on anything after 7.0.0. After digging into it I realized it was due to some rendering differences. Tests were expecting desktop HTML output while mobile was being outputted . Then after further investigation I realized that
window.innerWidth
was set to 0 and that was what was causing the issue.I found the your notes about setting the innerWidth via
window.happyDOM.setInnerWidth()
which I am now forced to call in my setup file.Describe the solution you'd like
I would like to see innerWidth by default set to 1024. Window.screen has width at 1024 currently, so I think it makes sense to match that. If people want to work on a different screen size they could still set it manually.
Describe alternatives you've considered
I would really consider any other screen size that is within the "desktop" size.
The text was updated successfully, but these errors were encountered: