TextField: bottomScrollV always equals numLines

Hi,

I have a textfield which has multi line and input as type. No matter how many lines I enter and how small it is in terms of height, bottomScrollV always equals numLines.

This makes it impossible to implement a ScrollBar which I do in my XFL-TextArea.
See: https://github.com/andreasdr/xfl/blob/master/openfl/controls/TextArea.hx#L144

Some logging example.
[Log] Utils.hx:250: _textField:0, 0, 380.3467806816098, 300.6782089233399, 1, 1, 1, (x=0, y=0, width=380.3467806816098, height=300.6782089233399), visible, nomask(openfl.text.TextField) (Pirate Fantasy Home Page.js, line 9593)
[Log] TextArea.hx:150: _textField.numLines: 53 (Pirate Fantasy Home Page.js, line 9593)
[Log] TextArea.hx:151: _textField.scrollV: 1 (Pirate Fantasy Home Page.js, line 9593)
[Log] TextArea.hx:152: _textField.bottomScrollV: 53 (Pirate Fantasy Home Page.js, line 9593)

My libs are:
lime: [7.6.3]
openfl: [8.9.5]

Any ideas?

Many thanx and

Best regards
Andreas

I’ve found when working with HTML5 the text field doesn’t immediately set its layout as “dirty”, so other properties aren’t accurate.

A hack that sometimes works is just to set the text field’s width or height to itself like so after making changes like appending text:

_textField.width = _textField.width;

That might force the internal text engine to update.

2 Likes

Will check later today. Thanx for the hint.

BTW: This was working in a previous release.

This does not work. :frowning:

Hi, were you able to figure it out? I’m facing the same problem.

Hi, I have not yet investigated but maybe I will do soon.

I believe we reverted the changes that caused this problem in the 8.9.6 release

Hi, I am on 8.9.6. Does not seem to be fixed.