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
@christophedejonge @andrew-worsfold
Hi, I was just about to post the same thing @christophedejonge posted when I saw this. I also have a lot of success with document.body.clientWidth and I think it should replace window.innerWidth. I am yet to see how this "may lead to other issues when the body isn't full-width".
This StackOverflows comments explains this well
Unfortunately, window.innerWidth and window.innerHeight fail to take the size of the scroll bar into account. If scroll bars are present, these methods return wrong results for the window size in nearly all desktop browsers. See http://stackoverflow.com/a/31655549/508355 – hashchange
@christophedejonge I am creating a theme with Tailor, please can you explain more on the css workaround. Adding the css above makes the entire site full-width. Thanks
Hi Andrew, very good page builder!
In
frontend.js
you usethis.el.style.width = window.innerWidth + "px";
innerWidth
includes the scrollbar.I first believed changing this to
window.clientWidth
fixes the problem.But I had more succes changing to
document.body.clientWidth
.This may lead to other issues when the body isn't full-width.
Furthermore, There are some problems with window resizing.
The text was updated successfully, but these errors were encountered: