Skip to content

InputMask on TextField doesn't apply setMaxLenght condition #3

@besatanas

Description

@besatanas

I'm getting a strange behaviour. If I extend a textField to have upper Casing, the setMaxLenght condition is not applied anymore and I can enter unlimited amount of characters.
`TextField textField = new TextField("caption of the text field limited with 5 chars");
TextField upperText = new TextField("Upper text limited with 5 chars");

textField.setMaxLength(5);
upperText.setMaxLength(5);

InputMask upperMask = new InputMask("") ; 
upperMask.setCasing(Casing.UPPER); 
upperMask.extend(upperText);

setContent(new VerticalLayout(textField,upperText));`

https://vaadinfiddle.com/editor/preview/7d60fe34c9c01b6a3e810c2da0524fdc49a277148085b6c957a8209ff05905e1/src/main/java/org/vaadin/vaadinfiddle/MyUI.java

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions