Skip to content

Wrong value after blur event #6

Description

@pedjapesic

I believe that this addon has some problem with blur event. I noticed that if you use blur event to get value of the TextField the most of the time it will return wrong value. It's very simple to reproduce it:

TextField tf1 = new TextField();
new NumeralFieldFormatter(tf1, ",", ".", -1, 2, false);
addComponent(tf1);

tf1.addBlurListener(new BlurListener() {
@OverRide
public void blur(BlurEvent event) {
System.out.println("tf1 = " + tf1.getValue());
}
});

When you type first value e.g. "5", after blur you will get "", when you continue to change it and observe the result, sometimes you get correct value, sometimes you get previous value meaning sometimes value will be stored before blur, sometimes after.

When you do not use NumeralFieldFormatter, blur event always returns correct value (value has been stored before blur event) and whatever you type it will be printed correctly.

Tested with Vaadin 8.0.6

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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