Bug Tracker

Opened 10 years ago

Closed 10 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)

event.diff (1.6 KB) - added by mike.helgeson 10 years ago.

Download all attachments as: .zip

Change History (4)

Changed 10 years ago by mike.helgeson

Attachment: event.diff added

comment:1 Changed 10 years ago by semper

In fact out of Opera 10, FF 3.5.2, Chrome 3.0 and IE 7 submit was triggered only in the latter.

comment:2 Changed 10 years ago by mitallast@…

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 10 years ago by john

Resolution: fixed
Status: newclosed
Version: 1.3.21.4a1
Note: See TracTickets for help on using tickets.