Skip to main content

Bug Tracker

Side navigation

#4268 closed bug (fixed)

Opened February 27, 2009 07:16PM UTC

Closed April 22, 2009 04:20AM UTC

Events bound to iframe windows bound to jQuery window instead

Reported by: tr4nslator Owned by: brandon
Priority: critical Milestone: 1.4
Component: event Version: 1.3.2
Keywords: iframe event Cc:
Blocked by: Blocking:
Description

An IE hack on line 2587 of 1.3.2 is preventing events from being bound on iframe windows:

if ( elem.setInterval && elem != window )
  elem = window;

This condition fires mistakenly for iframe windows, because they have the setInterval method but are not the main window.

This can be fixed easily changing this line to:

if ( elem.setInterval && ( elem != window && !elem.frameElement ) )
  elem = window;

As shown in the attached test cases.

Attachments (5)
  • after.html (0.7 KB) - added by tr4nslator February 27, 2009 07:17PM UTC.

    File pointing to fixed jQuery

  • before.html (0.7 KB) - added by tr4nslator February 27, 2009 07:17PM UTC.

    File pointing to original jQuery

  • jquery-1.3.2.js (117.9 KB) - added by tr4nslator February 27, 2009 07:18PM UTC.

    Original jQuery

  • jquery-1.3.2_after.js (118.0 KB) - added by tr4nslator February 27, 2009 07:16PM UTC.

    Patched jQuery file

  • ticket4268.patch (0.6 KB) - added by tr4nslator March 04, 2009 08:11PM UTC.

    Patch

Change History (1)

Changed April 22, 2009 04:20AM UTC by brandon comment:1

resolution: → fixed
status: newclosed

fixed in 6316