TextField not displaying text after \n

I am writing a small game in OpenFL (after migrating from AS3) and I stumbled upon a possible problem with the TextField.
I have a text that contains ‘\n’ characters. Using this code, I set that text to my TextField:

            this.textFormat = new TextFormat(Assets.getFont("fonts/arial.ttf").fontName);
            this.textFormat.size = 20;
            this.textFormat.color = 0xffffff;
            this.textFormat.align = TextFormatAlign.LEFT;

            textField = new TextField();
            textField.multiline = true;
            textField.wordWrap = true;
            textField.antiAliasType = AntiAliasType.ADVANCED;
            textField.autoSize = TextFieldAutoSize.LEFT;
            textField.embedFonts = true;
            textField.selectable = false;
            textField.text = displayText;
            textField.width = layout.storyTextFieldWidth() + 5;
            textField.height = textField.textHeight;
            textField.x = layout.storyTextFieldPozition().x;

The problem is, that after the first ‘\n’ character, no text is displayed. The height however is set correctly, just like there was text there.

I tried compiling both for HTML and for Windows (with -neko), but the problem persists. Am I doing something wrong or is there a problem in the implementation of the TextField?

UPDATE: I tried using htmlText. Using < br > I get the same result (nothing displayed after < br >). Also, using any tags (i, b, etc.) causes no text to be displayed at all.

textField.height = textField.textHeight;
textField.height = 30;//or any other number to discard if the problem is there
//or trace textField.textHeight and check if it’s what you expect for

i think that textField.textHeight is the size of the font
but textField.height is the size of the text container, the box

but i’m not sure, so try and trace those numbers

I was just working with the height. You are partially correct. The textHeight is not th eheight of the font, but the textHeight as displayed, however (and this is something I saw in flash as well), it not 100% accurate. Most of the time it is off by 10-20 pixels for larger texts.

Adding and extra 30 solved the problem.

textHeight is the height (in pixels) of the text after wrapping, not including margin or borders. height includes the margin and/or borders, so you get the actual height of the DisplayObject, and not the height of the inner text if that makes sense.

If you set wordWrap = true and autoSize = LEFT, then OpenFL should figure out the height for you.

That was my initial thought as well, but id does not. I get the same result as setting the height manually to textHeight.
Still, a quick fix is adding the border (aprox 20px).