#794 closed bug (fixed)
Default action gets called with FF2 even after jQuery(f).submit(function(e) { ... }) is defined.
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | major | Milestone: | 1.1 |
Component: | event | Version: | 1.1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Default form action gets called (browser submits the form) with FF2 even after jQuery(f).submit(function(e) { ... }) is defined with code below. This used to work with 1.0.4. I have tested with OSX FF 2.0.0.1 and Safari 2.0.4. Code fails only with FF.
Live examples at:
http://www.appelsiini.net/~tuupola/jquery/bugs/onblur-1.1b.html http://www.appelsiini.net/~tuupola/jquery/bugs/onblur-1.0.4.html
$(document).ready(function() { var f = $('form'); var i = document.createElement('textarea'); i.name = 'foo'; var b = document.createElement('input'); b.type = 'submit'; b.value = 'OK'; f.append(i); f.append(b); jQuery(i).blur(function(e) { jQuery(f).submit(); }); jQuery(f).submit(function(e) { e.preventDefault(); console.log('submit'); }); });
Change History (1)
comment:1 Changed 16 years ago by
Milestone: | → 1.1 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note: See
TracTickets for help on using
tickets.
Fixed in SVN rev 1049.