Browser.ScreenWidth/Height iOS issue

Bugs will be moved here once resolved.

Post » Sat May 23, 2015 6:55 am

Hi,
it is not really a bug, but an unwanted behavior.

Problem Description
The Browser Plugin Expressions ScreenWidth and ScreenHeight do not work correctly. The Values are correct, but not the orientation. On iOS the ScreenWidth Value is always the ScreenWidth in portait also if the phone (iPhone 5s) is on landscape. e.g. on iOS 320x568 regardless to the orientation.
A workaround: check the orientation and switch the values between width and height. e.g. on landscape width is always greater than height.
But why is the browser screen size on iOS different as on desktop. Perhaps you should change that in the plugin, Ashley.

Attach a Capx
Download here

Description of Capx
Just re/load the project to see the screen size of browser plugin on the left (top) side.

Steps to Reproduce Bug
Use Landscape Orientation!
  • Run it on the desktop (window 8.1 testet with chrome)
  • Run it on iOS (8.3 safari and / or cordova)

Observed Result
The screen size on iOS is always in portrait orientation. regardless on landscape mode.

Expected Result
The Width on landscape must be greater than the Height. But iOS only returns the portait size.

Operating System and Service Pack
Windows 8.1 and iOS 8.3 (iPhone 5s)

Construct 2 Version ID
r200
B
13
S
4
G
1
Posts: 107
Reputation: 1,337

Post » Tue May 26, 2015 10:24 am

The Browser object just returns what the browser says the screen width and height are, so I'm not sure we should change it to deviate from what the browser says. Arguably it is correct: the physical screen is not actually changing size when you change the orientation, just the display mode. I guess it's more like "return the physical size of the display". So closing as won't fix.
Scirra Founder
B
403
S
238
G
89
Posts: 24,648
Reputation: 196,133


Return to Closed bugs

Who is online

Users browsing this forum: No registered users and 3 guests