Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong value after blur event #6

Open
pedjapesic opened this issue Sep 4, 2017 · 0 comments
Open

Wrong value after blur event #6

pedjapesic opened this issue Sep 4, 2017 · 0 comments

Comments

@pedjapesic
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant