It’s been my experience that you usually should set autoSize after setting the text, not before. Otherwise, there’s nothing for the text field to size itself against.
Currently, this causes the last line in any text field to fail to display (html5 target). For now, adding 5 extra pixels to text field height seems prevent that.
This will make the TextField slightly too small to display its text. TextFields have an extra “gutter” that inserts about 2 pixels of empty space on all four sides of the text. Anyway, textWidth and textHeight measure the text without the gutter, so they’ll both be about 4 pixels too small when used as the width and height.
(To be clear, this is behavior that existed in Flash too, and it’s not something specific to OpenFL or the html5 target)
Thanks @joshtynjala, I appreciate your explanation of what’s going on, and @loudo for seconding. I’ll keep it in mind when approaching text fields in future.
It is odd that it wasn’t an issue when I developed this app, this time last year. Exactly the same project files, just updated Haxe / Lime/ OpenFL, etc.