Skip to content

Multiline TextArea shifts vertically when editing starts #5345

Description

@ThomasH99

With 7.0.256, compile the below code and start editing the text in the first text field. It will shift up and when exiting it shifts down again.

The expected behavior is to 'stay in place' and only shift up if additional text is entered so it needs another line of text.

                Form form = new Form("Edit text", new BoxLayout(BoxLayout.Y_AXIS));
                TextArea textArea = new TextArea("text text", 3, 20, TextField.INITIAL_CAPS_SENTENCE);
                textArea.setAlignment(TextArea.LEFT);
                textArea.setGrowByContent(true);

                form.getContentPane().setScrollableY(true );
                form.getContentPane().add( new Label("Label"));
                form.getContentPane().add( textArea);
                form.getContentPane().add(new TextArea("another textArea"));
                form.show();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions