Jump to content

Bring up mobile keyboard in Phaser


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


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

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

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