Bug Tracker

Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#5835 closed bug (fixed)

Inline script events and "live"

Reported by: superware Owned by: brandon
Priority: major Milestone: 1.4.1
Component: event Version: 1.4
Keywords: inline events live Cc:
Blocked by: Blocking:


Registering a live event somehow affects inline script events, even when the live selector isn't related to the inlined element.

Attachments (2)

onclick.html (410 bytes) - added by superware 13 years ago.
onclick2.html (1.3 KB) - added by iraebrasil 13 years ago.
trying to create a testcase for the fix

Download all attachments as: .zip

Change History (7)

Changed 13 years ago by superware

Attachment: onclick.html added

comment:1 Changed 13 years ago by superware

Forgot to mention, seems to be an IE6/7 issue.

comment:2 Changed 13 years ago by iraebrasil

I've found the problem.

liveHandler starts with a returnValue of true and in some cases changes it to false. This true value tells IE that it should fire the event, regardless of another handlers (or at least is what I suppose it's happening).

The fix is simple, it's to start the returnValue with undefined, and never change it to true. I've made a commit for that: http://github.com/irae/jquery/commit/6438ab0da979307d8ea0ec5183d6a5e5a57bead8

I was unable to create a test case. Nothing I could do with javascript seems to simulate the bug. Regardless of that, I've tested my fix in firefox, chrome and IE6 and no regressions were made by this simple fix.

I'll attach my debug case with draft for testcase. If anyone figures out how to simulate this with javascript, please, let me know.

Changed 13 years ago by iraebrasil

Attachment: onclick2.html added

trying to create a testcase for the fix

comment:3 Changed 13 years ago by superware

iraebrasil, any news? :(

comment:4 Changed 13 years ago by john

Priority: criticalmajor
Resolution: fixed
Status: newclosed

comment:5 Changed 12 years ago by addyosmani

#5816 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.