space_elevators Posted October 7, 2014 Report Share Posted October 7, 2014 Hi, all - I've seen this post about bringing up the mobile keyboard in a Phaser game, but the discussion was pretty short and I can't find any examples. Has anyone done this before? If so, how did you go about it? Quote Link to comment Share on other sites More sharing options...
SebastianNette Posted October 7, 2014 Report Share Posted October 7, 2014 As stated in that topic you need 1 real input element.var input = document.createElement("input");input.type = "text";input.style.cssText = "position:absolute; left:-1px; top: -1px; width:1px; height:1px; opacity:0";document.body.appendChild(input);show keyboardinput.focus();Apparently there are devices that still fail showing the keyboard with that approach. In that case you would have to do some device detection and then use a prompt or a different method to allow text input. I heard this mostly happens on Chrome for Android. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.