Dom input TextField

Input TextField doesn’t seem to work on mobile with Ddom flag (emulating mobile device in chrome triggers the same issue), however if I move div containing textfield somewhere outside of the openfl-content div it works fine.
I think it’s related to TextField not recieving touch events, if I call focus manually on the div element it works okay, however it won’t lose focus unless I call blur.

var div:Dynamic =  (@:privateAccess myTextField.__div);
div.focus();

You can test it here:
http://hawker-bat-65322.bitballoon.com/

Here’s how I’m adding TextField to scene:

var input:TextField = new TextField();
input.width = 300;
input.height = 120;
input.x = stage.stageWidth / 2 - input.width / 2;
input.y = stage.stageHeight / 2 - input.height / 2;
addChild(input);
input.type = TextFieldType.INPUT;
input.textColor = 0xFFFFFF;
input.borderColor = 0xFFFFFF;
input.border = true;
input.multiline = true;
input.wordWrap = true;

I think the -Ddom target has a lot of promise. I apologize for issues like this. Perhaps it’s due to a preventDefault in our touch event handling code, or perhaps we need to add a __div.focus() in the TextField class when it receives stage focus?

I’ve added __div.focus() and __div.blur() in __startTextInput() and __stopTextInput() methods. I can now focus on textfields, however I can’t move caret and select portions of text. I’ll try to figure it out later and create a push request if I get it to work :slight_smile: