TextFields Again

Testing on OpenFL 8.2.2 & 8.3.0

Not sure if this is purely related to html5 yet, not tested other targets, but there still appears to be an issue relating to TextFields, and in particular related to scrolling with scrollV, which I couldn’t get to work.

Adding a line to a textField and incrementing it’s scollV by 1 always returned a scrollV of 1, and therefore wouldn’t scroll.

I also found maxScrollV always returns 1, which is an issue as scrollV is limited to maxscrollV in TextField.hx…

if (value > __textEngine.maxScrollV) value = __textEngine.maxScrollV;

Changing this to…

if (value > __textEngine.numLines) value = __textEngine.numLines;

and scrollV now works, but obviously doesn’t resolve the issue with the value returned by __textEngine.maxScrollV or something I’ve not considered.

Any insights?

It’s possible this was fixed in the development builds, or the issue does appear that maxScrollV is not updating properly. I think part of the complexity here is that (if I’m not mistaken) maxScrollV considers the size of the TextField, not just the number of lines, to consider how many lines can be scrolled, for example, a four-line text in a three-line field will have a max scroll of 1.