w3c / Mobile-Checker

The Mobile Checker is a tool for Web developers who want to make their Web page or Web app work better on mobile devices.
https://validator.w3.org/mobile-alpha/
MIT License
322 stars 84 forks source link

Viewport to Screen Relationship Issue = Wrong clientWidth #126

Open hexalys opened 9 years ago

hexalys commented 9 years ago

The screen.width and viewport width are 320px, while both the innerWidh and clientWidth are 345px, which the total of 320px + screenX=10px + scrollbar=15px. I am not sure where that comes from. At the least, screenX should be assumed to be 0 in a mobile environment.

That will very likely lead to JS rendered layout not being rendered properly, due to incorrect clientWidth.