Skip to main content

Bug Tracker

Side navigation

#8870 closed bug (duplicate)

Opened April 13, 2011 11:09PM UTC

Closed September 01, 2011 05:02PM UTC

Last modified March 14, 2012 06:59PM UTC

Binding an event to an iframe window will throw an exception on unbind in ie

Reported by: jwyles@atlassian.com Owned by:
Priority: high Milestone: 1.next
Component: event Version: 1.5.2
Keywords: Cc:
Blocked by: Blocking:
Description

When binding an event to a window other than the current will throw an exception on unbind of that event in ie8, as it attempts to delete off the window.

Pull request to fix the issue can be found at https://github.com/jquery/jquery/pull/324

Following code is a test case:

<!DOCTYPE html>
<html>
    <head></head>
    <body>
    <iframe name="test"> 
    </iframe>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.5.2/jquery.js"></script>
    <script>
        var testFrame = window.frames["test"],
            callback = function() { console.log("called"); };
        $(testFrame).bind('resize',callback);
        $(testFrame).trigger('resize');
        $(testFrame).unbind('resize',callback);
        $(testFrame).trigger('resize');
    </script>
    
    </body>
</html>
Attachments (0)
Change History (5)

Changed April 14, 2011 03:26AM UTC by timmywil comment:1

component: unfiledevent

I created a test case, but haven't checked it in IE8 yet. http://jsfiddle.net/timmywil/wHmw2/

Changed April 15, 2011 02:14AM UTC by timmywil comment:2

priority: undecidedhigh
status: newopen

Confirmed. Believe it happens on delete cache[ id ] in removeData

Changed April 15, 2011 04:07AM UTC by jwyles@atlassian.com comment:3

It is in removeData, the fix and test case is on the pull request linked.

Changed September 01, 2011 05:02PM UTC by dmethvin comment:4

resolution: → duplicate
status: openclosed

Changed September 01, 2011 05:02PM UTC by dmethvin comment:5

Duplicate of #10080.