You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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);
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
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: