I have a problem related to a textfield inside a modalwindow of twitter bootstrap over a unity5 webgl canvas.
The problem is that when the textfield is over the canvas with the game loaded, it doesnt work. I cant type. It is not a problem of focus or z-index, the problem is like the canvas is “stealing” the events of keyboard from the textfield, and i cant make it work.
Does anyone have the same problem like me? Did someone find a solution? i have been all day trying to solve this.
If somebody have the same problem, please reply also, so we can find a solution together,
Yes. Seems to be a known issue. We’re experimenting with the following solution:
I also found a hack to make work the textfield:
What i did is to put the textfileds inside a iframe, and then using jquery i get the text of the field. happen to wortk in games where you need the keyboard filling textfields and the keyboard using the game.
The use case is this:
you have the canvas, the user has to login. You use twitter bootstrap modal windows, so the form is over the canvas and you cant use the textfields.
What i did is to put the textfield inside a iframe and then when the user click submit, with jquery i get the text of the texfield like:
var iframeContent = $('#loginIframe').contents();
var email = iframeContent.find('#inputUser').val();
var password = iframeContent.find('#inputPassword').val();