Browser Component Device Width/Height Incorrect in iPad Landscape

Wappler Version : 5.3.1
Operating System : iPadOS (15.5)
Server Model: NodeJS

Was testing an app’s responsiveness on iPad Pro and found that one of dynamic class toggle was not working. The condition is set to browser1.device.width > 991.
Using dev tools on an iPad simulator, I found that the browser component is showing incorrect height and width.
The orientation is shown correctly as landscape though.

The issue is in both Safari and Chrome on iPad (because of same engine in code probably).

I don’t think iOS will swap those when in landscape mode. It doesn’t care about the orientation so it returns the screen width and height always the same.
What you want to use here (and better) is the viewport width :slight_smile:

1 Like

Ah yes! I had discovered that some time ago (not for iPad, but in general) but completely missed it now.
Thank you. :slight_smile:

1 Like