Opened 13 years ago
Closed 13 years ago
#5124 closed bug (fixed)
trigger("submit") fails in Firefox
Reported by: | mike.helgeson | Owned by: | brandon |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | event | Version: | 1.4a1 |
Keywords: | Cc: | ||
Blocked by: | Blocking: |
Description
Triggering a native submit behavior on a form element is failing in Firefox 3.5.2. The problem seems to be a regression from the fix for http://dev.jquery.com/ticket/3533, which addressed MSIE throwing errors on certain triggered events where the type contains a colon character. I put together two simple samples to illustrate the difference between 1.3.2 and the latest build.
The trigger succeeds (1.3.2): http://jsbin.com/ixege
The trigger fails (nightly): http://jsbin.com/owisi
I have included a patch which seems to correct the issue.
Attachments (1)
Change History (4)
Changed 13 years ago by
Attachment: | event.diff added |
---|
comment:1 Changed 13 years ago by
comment:2 Changed 13 years ago by
http://code.jquery.com/jquery-1.4a1.js
I replace the
1041 >> nativeFn();
to
1041 >> elem[type]();
It's working in firefox 3.5 and 3.6.beta4. I think that the line nativeFn = elem [type]; get a link or copy function. this seems to fail with the closure, tore out the function of context.
Sorry for my english, and I learn Javascript less than one year.
comment:3 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
Version: | 1.3.2 → 1.4a1 |
Fixed. Thanks for the hint, mitallast! http://github.com/jquery/jquery/commit/86bbf9cf87784cdd81ca79e4d809ef6f5879ef8b
In fact out of Opera 10, FF 3.5.2, Chrome 3.0 and IE 7 submit was triggered only in the latter.