Hello everyone. We are suffering with some issues: We develop a view, check with developertools (Chrome, Edge) and it looks good. Once we deploy it and visit the page on a physical device, the view looks very different. The width doesnt fit, the height is different and there is a horizontal scrollbar on the mobile view which should not be there.
Does anyone has any hint whats going on? Its a mess and very frustrating - i dont know if its browser, layout or what ever problem
Did I understand correctly that you’ve used the browser’s devtools to emulate specific mobile devices, or corresponding viewport sizes, and it looks correct there, but not on actual devices with the same viewport sizes?
Height can be tricky (and not just in Vaadin apps) since mobile browsers these days have dynamic viewport heights that change as toolbars slide in and out as you scroll. There are some new css units intended to help with that, but they also don’t behave the same on iOS and Android browsers.
Width is more surprising, however. It would help to see a screenshot and have some idea of how the layout is constructed (e.g. are you using AppLayout as the root layout, how is the layout within that implemented, etc).
Thanks, i have added this ViewPort Annotation and removed a padding in the navbar, now it look good i think. Need to check on different deviced.
But the most issue which drives me crazy is, that the chrome dev tools view shows that every thing is fine, but on a physical device it doesnt fit.
If mobile devices are important, I’d urge to test with simulators/emulators that you run on your workstation. That is pretty handy (and you can e.g. hook an iphone simulator to a desktop Safari’s web inspector), but results are much closer to actual devices than with Chrome’s dev tools.