space_elevators Posted October 7, 2014 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? Link to comment Share on other sites More sharing options...
Sebi Posted October 7, 2014 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. Link to comment Share on other sites More sharing options...
Recommended Posts