Problem/Motivation
Ajax handlers use following code to avoid to may requests to the backend:
// Do not fire on every keystroke. Ajax callbacks are expensive.
if (this.settings['name_event'] == 'onkeyup') {
return true;
}
To be able to do this jquery.validate.js
was adjusted to set that variable in function delegate(event) {
.
Unfortunately it seems that there are cases in which delegate()
isn't triggered and the call goes directly through:
// validate the form on submit
this.submit( function( event ) {
in jquery.validate.js
.
If that happens validator.settings['name_event']
won't reflect the submit event but the last one that was handled by delegate()
.
This can lead to situations in which a submit is processed without triggering the validation at all.
Proposed resolution
Set validator.settings['name_event']
in this.submit( function( event ) {
too.
Remaining tasks
Reviews required.
User interface changes
None
API changes
None
Data model changes
None
Comment | File | Size | Author |
---|---|---|---|
clientside_validation-inconsistently-set-name_event-setting.patch | 41.78 KB | das-peter | |
Comments