Skip to main content

Bug Tracker

Side navigation

#3675 closed feature (wontfix)

Opened December 02, 2008 02:00PM UTC

Closed June 16, 2009 09:02PM UTC

reset event

Reported by: Bouki Owned by: brandon
Priority: minor Milestone: 1.3
Component: event Version: 1.2.6
Keywords: reset event Cc:
Blocked by: Blocking:
Description

I don't know why but the event corresponding to onreset is not implemented in jquery.

Attachments (1)
  • test-3675.html (0.6 KB) - added by dmethvin January 31, 2009 05:44PM UTC.

    test of form reset event

Change History (4)

Changed January 31, 2009 05:46PM UTC by dmethvin comment:1

resolution: → worksforme
status: newclosed

Seems to work for me in FF, IE, Chrome, and Safari.

Changed June 15, 2009 08:37PM UTC by woodspire comment:2

resolution: worksforme
status: closedreopened

the bind function in jquery 1.3.2 works if you bind a 'reset' event, but there is no function reset() but there is a submit() function.

the line 3093 in jquery dev version should also list 'reset' as a possible function. Also, the documentation event documentation (http://docs.jquery.com/Events) should be updated to list the new reset function.

Also, it seems that jquery doesn't care if you try to bind a 'submit' even on an element other than a 'form'. Is that normal ? I would have taught that jquery would warn the user that it's incorrect.

Changed June 16, 2009 12:41AM UTC by dmethvin comment:3

Please attach a test case that demonstrates the problem.

There is nothing wrong with attaching a "submit" event to any element, because code can always

.trigger("submit")
on an element whether the DOM does or not.

Changed June 16, 2009 09:02PM UTC by brandon comment:4

resolution: → wontfix
status: reopenedclosed

jQuery does not have shortcuts for all event types, just the most popular. There is not a corresponding .reset() short-cut. You must use .bind() or create a .reset() plugin.

$.fn.reset = function( fn ) {
    return fn ? this.bind( "reset", fn ) : this.trigger("reset");
};