Opened 14 years ago
Closed 14 years ago
#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: | |
Blocked by: | Blocking: |
Description
I don't know why but the event corresponding to onreset is not implemented in jquery.
Attachments (1)
Change History (5)
Changed 14 years ago by
Attachment: | test-3675.html added |
---|
comment:1 Changed 14 years ago by
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Seems to work for me in FF, IE, Chrome, and Safari.
comment:2 Changed 14 years ago by
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
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 14 years ago by
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 14 years ago by
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
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"); };
test of form reset event