Keep showing invalid input number and set NaN on the model
When a dialog (form) is validated and show the error message from the browser, the input number must be visible. Also we should not store on the model invalid values to get error on client side instead of the server side. issue8487 review255661002
This commit is contained in:
1 parent
50c6047185
commit
77f6c00cad
1 file changed
+9
-3
+9
-3
@@ -1591,8 +1591,10 @@ function eval_pyson(value){
|
||||
input.attr('lang', Sao.i18n.getlang());
|
||||
|
||||
input.hide().on('focusout', function() {
|
||||
input.hide();
|
||||
input_text.show();
|
||||
if (input[0].checkValidity()) {
|
||||
input.hide();
|
||||
input_text.show();
|
||||
}
|
||||
});
|
||||
input_text.on('focusin', function() {
|
||||
if (!input.prop('readonly')) {
|
||||
@@ -1626,7 +1628,11 @@ function eval_pyson(value){
|
||||
this.record, this.get_value(), undefined, this.factor);
|
||||
},
|
||||
get_value: function() {
|
||||
return this.input.val();
|
||||
if (this.input[0].checkValidity()) {
|
||||
return this.input.val();
|
||||
} else {
|
||||
return NaN;
|
||||
}
|
||||
},
|
||||
get_client_value: function() {
|
||||
var value = '';
|
||||
|
||||
Reference in new issue
Block a user