v11.1p_2019-05-15/LGPL, Chrome v76.0.3809.100, using the Enterprise skin.
A little while back upgraded to the above version to resolve a different problem but are now noticing that server validation doesn't fire (always) for a DynamicForm with autofocus:true. Have created a standalone test case to demonstrate the errant behaviour.
The files BugFetch.js and BugValidate.js contain mocked up server resonses for the fetch and validate operations, which I've attached.
To see the problem we're observing, first open up the Chrome Dev Tools network trace window and then run the above test case. The cursor shows in the text field. Click the button, then click into the text field, type "aa" (or anything really) and tab out of the field. If you look at the network trace the fetch has been executed but not the field validate for when you tab off the text field.
Then remove the autofocus:true setting from the DynamicForm. Open network trace, run the test case, but this time the text field hasn't got initial focus, so just click the button, click into the text field, type "aa" and tab off. If you look at the network trace the fetch has been executed but this time the field validate has been executed also as you'd expect.
If someone could find the time to take a look at this please it would be appreciated.
Thanks,
David.
A little while back upgraded to the above version to resolve a different problem but are now noticing that server validation doesn't fire (always) for a DynamicForm with autofocus:true. Have created a standalone test case to demonstrate the errant behaviour.
Code:
<html> <head> <script type="text/javascript">var isomorphicDir = "/js/libs/smartclient/";</script> <link rel='stylesheet' type='text/css' href="/js/libs/smartclient/skins/Enterprise/skin_styles.css" /> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_core.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_foundation.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_containers.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_grids.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_forms.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_databinding.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_richtexteditor.js"></script> <script type="text/javascript" src="/js/libs/smartclient/system/modules-debug/isc_drawing.js"></script> <script type="text/javascript" src="/js/libs/smartclient/skins/Enterprise/load_skin.js"></script> </head> <body> <script type="text/javascript"> var ds = isc.DataSource.create({ dataFormat: 'json', operationBindings: [ {operationType: "fetch", dataURL: "BugFetch.js" }, {operationType: "validate", dataURL: "BugValidate.js" } ] }); isc.VLayout.create({ overflow: "auto", defaultWidth: "100%", defaultHeight: "100%", members: [ isc.DynamicForm.create({ autoFocus: true, autoFetchData: true, dataSource: ds, fields: [ { name: "to", validateOnExit: true, height: 20, validators: [{"serverOnly": true }], value: "" }, { type: "button", name: "button0", validateOnExit: true, height: 20, validators: [{"serverOnly": true }] }] }) ] }); </script> </body> </html>
To see the problem we're observing, first open up the Chrome Dev Tools network trace window and then run the above test case. The cursor shows in the text field. Click the button, then click into the text field, type "aa" (or anything really) and tab out of the field. If you look at the network trace the fetch has been executed but not the field validate for when you tab off the text field.
Then remove the autofocus:true setting from the DynamicForm. Open network trace, run the test case, but this time the text field hasn't got initial focus, so just click the button, click into the text field, type "aa" and tab off. If you look at the network trace the fetch has been executed but this time the field validate has been executed also as you'd expect.
If someone could find the time to take a look at this please it would be appreciated.
Thanks,
David.
Comment