Skip to main content

Bug Tracker

Side navigation

#6473 closed bug (invalid)

Opened April 22, 2010 06:30PM UTC

Closed April 22, 2010 11:05PM UTC

[validate] - cancel button submits form when it should not

Reported by: stephenp Owned by:
Priority: Milestone: 1.4.3
Component: unfiled Version: 1.4.2
Keywords: Cc:
Blocked by: Blocking:

Add a button with class "cancel" and the validation plugin handles the cancellation. Cool. But maybe I'm confused. Wouldn't pressing a Cancel button NOT submit the form. Instead, it is implemented the opposite way, where clicking Cancel skips validation and submits the form directly. That seems nuts to me. A user clicks Cancel, no form submit should happen and user code should close the form or whatnot.

The code that submits the form is found on line 74

if ( validator.cancelSubmit ) {

validator.cancelSubmit = false;

return handle();


When it returns "handle()", that submits the form directly. Why doesn't it just return false?

Attachments (0)
Change History (1)

Changed April 22, 2010 11:05PM UTC by dmethvin comment:1

resolution: → invalid
status: newclosed

This bug tracker is for jQuery core. Please ask other questions on the forum, or report them using the method requested on the plugin's home page.