Bug Tracker

Modify

Ticket #5835 (closed bug: fixed)

Opened 2 years ago

Last modified 15 months ago

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:
Blocking: Blocked by:

Description

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

Attachments

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

Change History

Changed 2 years ago by superware

comment:1 Changed 2 years ago by superware

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

comment:2 Changed 2 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 2 years ago by iraebrasil

trying to create a testcase for the fix

comment:3 Changed 2 years ago by superware

iraebrasil, any news? :(

comment:4 Changed 2 years ago by john

  • Priority changed from critical to major
  • Status changed from new to closed
  • Resolution set to fixed

comment:5 Changed 15 months ago by addyosmani

#5816 is a duplicate of this ticket.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.