Problem Description
In Facebook and Twitter's in-app browsers on iOS, games are not vertically centered; they're offset, which can result in them being stuck off-screen if they're too tall.
Attach a Capx
dl.dropboxusercontent.com/u/96439/Games/Construct2/browser_bug.capx dl.dropboxusercontent.com/u/96439/Games/Construct2/browser_bug.capx
Description of Capx
"New empty project" with no changes.
Steps to Reproduce Bug
- Create a "New empty project"
- Export as HTML5 website, either "Normal style" or "Embed style"
- Host it somewhere (I used Dropbox)
- DM it to yourself on Twitter, or post it privately on Facebook
- Open it in Twitter or Facebook's in-app browser
Observed Result
The game is shifted down from center by about 53 points (106 Retina pixels).
Expected Result
The game should be centered vertically.
Affected Browsers
All of these are iOS in-app browsers based on WebKit.
- Twitter: YES
- Facebook: YES
- TweetBot: YES
- Safari: NO
- iOS 9 Safari View Controller (used in Evernote and others): NO
- Facebook Messenger: NO
- Google: NO
- Pocket: NO
Operating System and Service Pack
iPhone 5 running iOS 9.2.1
Construct 2 Version ID
Release 221
Notes
When a game uses touch screen controls, the user can't scroll the viewport, so an offscreen game is stuck there.
Because this happens in Twitter's in-app browser, you can view the problem in this tweet:
twitter.com/kelseyhigham/status/696117704931971072 twitter.com/kelseyhigham/status/696117704931971072
Screenshots of Safari, Twitter, and Facebook: