I am currently working on an HTML5 game engine and I need to use the Input element.
First I made a script to create the element dynamically.
The element it created did not work like an Input element but was nothing more than a simple box.
So I put the Input element in without using Javascript, simply
<input type="text" />
It does not work either. It creates an element and it changes the cursor when you hover over it, but you can not write into it.
Does anyone know what can be the cause of that?
The cause is probably some sort of bound key event handler that stops propagation before it reaches the text box. This sound especially likely considering you’re working on a game engine.
Check your code for event handlers that might block your key events from reaching the text input. Also make sure that your code doesn’t prevent the input from receiving focus.