Skip to main content

Bug Tracker

Side navigation

#4145 closed bug (invalid)

Opened February 13, 2009 11:57AM UTC

Closed October 12, 2009 11:41PM UTC

[validate] If an issue is fixed just before the submit is clicked the form is not submited

Reported by: logren Owned by:
Priority: major Milestone:
Component: plugin Version:
Keywords: validate Cc:
Blocked by: Blocking:
Description

I need to double click the submit button to submit a form if an error was fixed just before submit.

The onkeyUp event is disabled ("onkeyup:false" in plugin settings).

Let's assume there is an email field and submit button

The sequence is as follows:

1. Put wrong value to email field

2. Click submit

3. The error shows up

4. Correct the value

5. Click submit

5. The error disappears, but the form is not sent

6. Click submit again

7. The form is sent

What I noticed is that after clicking the button in step (5) the focusout event is trriggered, but there is no click event

Attachments (0)
Change History (2)

Changed April 06, 2009 02:03AM UTC by sreichert comment:1

I believe I've found a solution for this issue. This also resolves an issue I've noticed where the 2nd field on the form is automatically validated to be false upon initial focus.

In the the validation library, find the onkeyup function assignment, and modify by adding an else condition, so it would look as follows:

onkeyup: function(element) {

if ( element.name in this.submitted || element == this.lastElement ) {

this.element(element);

}

else{

if($(element).val() != ''){

this.element(element);

}

}

},

Thanks,

Shai

Changed October 12, 2009 11:41PM UTC by dmethvin comment:2

resolution: → invalid
status: newclosed

This is not a jQuery core bug. Please report plugin bugs to the plugin's author, or ask on the jQuery forums. jQuery UI bugs should be reported on the UI bug tracker, http://dev.jqueryui.com .