Ticket #3675 (closed feature: wontfix)
reset event
| Reported by: | Bouki | Owned by: | brandon |
|---|---|---|---|
| Priority: | minor | Milestone: | 1.3 |
| Component: | event | Version: | 1.2.6 |
| Keywords: | reset event | Cc: | |
| Blocking: | Blocked by: |
Description
I don't know why but the event corresponding to onreset is not implemented in jquery.
Attachments
Change History
Changed 4 years ago by dmethvin
-
attachment
test-3675.html
added
comment:1 Changed 4 years ago by dmethvin
- Status changed from new to closed
- Resolution set to worksforme
Seems to work for me in FF, IE, Chrome, and Safari.
comment:2 Changed 4 years ago by woodspire
- Status changed from closed to reopened
- Resolution worksforme deleted
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.
comment:3 Changed 4 years ago by dmethvin
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.
comment:4 Changed 4 years ago by brandon
- Status changed from reopened to closed
- Resolution set to wontfix
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");
};
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

test of form reset event