mattbrand Posted November 13, 2017 Share Posted November 13, 2017 In my game I have a form that I built with Orange Games' input plugin (https://github.com/orange-games/phaser-input). The input form working great on computer, but on mobile when you tap into an input field, it zooms in, and becomes impossible to see what you're doing, or go to the next field. I tried using scale prevention with meta tags: <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui"> and: <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=2, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" /> but my game uses "game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL" to look good on all resolutions. So when I put in the meta tags, it doesn't scale initially, and it is too big on mobile. Is there any way to use a meta tag that allows for initial scaling on mobile, but then freezes the scale in order to prevent zooming on input fields? Link to comment Share on other sites More sharing options...
samme Posted November 13, 2017 Share Posted November 13, 2017 Said to be prevented by using a minimum font size of 16px on the inputs. Link to comment Share on other sites More sharing options...
mattbrand Posted November 13, 2017 Author Share Posted November 13, 2017 I read that as well. I am using 24px. But I am scaling, so perhaps when it scales really small on mobile that's when it gets weird. Link to comment Share on other sites More sharing options...
samme Posted November 13, 2017 Share Posted November 13, 2017 So what value are you using for meta-viewport? Link to comment Share on other sites More sharing options...
vastron Posted March 16, 2018 Share Posted March 16, 2018 in my case it worked like this: in html i do this : <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, width=device-width" /> in css, this: * { padding: 0; margin: 0; } and in phaser i do this game.scale.scaleMode = Phaser.ScaleManager.SHOW_ALL; game.scale.pageAlignHorizontally = true; game.scale.pageAlignVertically = true; Link to comment Share on other sites More sharing options...
Recommended Posts