PL-10472 User cannot reset focus for empty MaskedField

This commit is contained in:
Daniil Tsarev 2018-04-03 13:28:18 +04:00
parent 41faf45ea6
commit 1307df49ae

View File

@ -319,6 +319,15 @@ public class CubaMaskedFieldWidget extends VTextField {
}
}
@Override
public void updateFieldContent(String text) {
super.updateFieldContent(text);
if (text == null || text.isEmpty()) {
valueBeforeEdit = valueBuilder.toString();
}
}
public void updateTextState() {
if (valueBeforeEdit == null || !getText().equals(valueBeforeEdit)) {
valueBeforeEdit = getText();