Skip to content

TextField Selection API #1377

@heruan

Description

@heruan

A Java API for setSelectionRange would be very useful for all the Vaadin text fields, e.g.

TextField textField = new TextField();
new Button("Select all", event -> textField.selectAll());

Also access to execCommand could open advanced use cases for the Java API, e.g.

TextField textField = new TextField();
new Button("Copy", event -> {
    textField.selectAll();
    textField.copyToClipboard();
    Notification.show("Copied to your clipboard!");
});

See Clipboard.js for a related JavaScript API.

Metadata

Metadata

Assignees

No one assigned

    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