Ticket #9303 (closed bug: invalid)
.submit broken on form element
|Reported by:||Jonathan Horowitz <jhorowitz@…>||Owned by:|
This bug affects all versions of jQuery since 1.4.1, but is readily apparent as of 1.6 due to the removal of the try...catch block originally intended to fix bug #3533, which was also catching the error thrown by this bug.
It seems to have been introduced by the fix for bug #5695.
I have reproduced this bug on Firefox 4.0.1 (on Gentoo Linux 32bit) and IE 8.0.6001.18702 (on Windows XP Pro, 32bit).
To reproduce, simply use the .submit() function as per the API. E.g.:
What should happen is that the form submits.
What actually happens is that the following error is thrown (In Firefox Firebug console view):
In IE, an "Object expected" error is thrown.
From my tests, it appears that the call to
is to blame. This calls the onsubmit handler, which containsstopPropagation();
In v1.4, it would instead call
which works fine.