Chrome change breaks the visual viewport

Chrome have released an update to the way window.innerWidth/Height works, now reporting the layout viewport dimensions over the visual viewport dimensions. For me, this has zero impact on the types of sites I build but you might be different and should know about the updates.

The problem with the viewports is not browser support. All browsers — and when I say all I mean ALL; not just Safari, Firefox, Edge, and, until recently, Chrome, but also the ones you never heard of, some of which are based on earlier Chromium versions — support window.innerWidth/Height as the dimensions of the visual viewport. Only the proxy browsers have problems here because they aren’t equipped to track user zoom level.

An excerpt from Chrome change breaks the visual viewport

View original article

Subscribe to our Newsletter

Add your email address and receive an email every Friday covering off everything worth knowing about building your websites responsively.