Skip to content

OSX: Entering curly braces and brackets is broken in 0.10.5 while 0.10.4 works (javafx14) #967

@Siedlerchr

Description

@Siedlerchr

Expected Behavior

On a Macbook with Mac OSX 10.15 I am able to enter curly braces and brackets. []{}. using the Option (or Alt) ⌥ key

Actual Behavior

With version 0.10.5 I am unable to enter curly braces and brackets , when I downgrade to 0.10.4 it works.

Reproducible Demo

Orgiinal code

public class Bug extends Application {

 public void start(Stage primaryStage) {

	StackPane root = new StackPane();
       Scene scene = new Scene(root,400,400);

        CodeArea codeArea = new CodeArea();
        codeArea.setWrapText(true);
        codeArea.setInputMethodRequests(new InputMethodRequestsObject());
        codeArea.setOnInputMethodTextChanged(event -> {
            String committed = event.getCommitted();
            if (!committed.isEmpty()) {
                codeArea.insertText(codeArea.getCaretPosition(), committed);
            }
        });


        codeArea.setId("bibtexSourceCodeArea");
         root.getChildren().add(codeArea);
 primaryStage.setScene(scene);

  primaryStage.show();



 }
 /* Work around for different input methods.
     * https://github.com/FXMisc/RichTextFX/issues/146
     */
    private static class InputMethodRequestsObject implements InputMethodRequests {

        @Override
        public String getSelectedText() {
            return "";
        }

        @Override
        public int getLocationOffset(int x, int y) {
            return 0;
        }

        @Override
        public void cancelLatestCommittedText() {
            return;
        }

        @Override
        public Point2D getTextLocation(int offset) {
            return new Point2D(0, 0);
        }
    }
}

Environment info:

  • RichTextFX Version: 0.10.5
  • Operating System: OSX 10.15.7
  • Java version: 14 + openjfx14

Current Workarounds

Downgrade to 0.10.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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