Jump to content

Bring up mobile keyboard in Phaser


space_elevators
 Share

Recommended Posts

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 keyboard

input.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

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...