Skip to content

Backspacing a newline character hides the previous line #298

@JordanMartinez

Description

@JordanMartinez

Run the following code:

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.stage.Stage;
import org.fxmisc.richtext.InlineCssTextArea;
import org.fxmisc.richtext.NavigationActions;

public class BugIssue extends Application {

    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {

        InlineCssTextArea area = new InlineCssTextArea("Hello there");
        primaryStage.setScene(new Scene(area, 400, 400));
        primaryStage.show();

        area.lineEnd(NavigationActions.SelectionPolicy.CLEAR);
        area.requestFocus();
    }
}

Then do the following steps

  1. press enter key
  2. press backspace key

You will see the first line is now hidden. If you type anything after that, the line will reappear.

No doubt this bug is introduced somehow with the new WellBehavedFX release.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions