#8870 closed bug (duplicate)
Binding an event to an iframe window will throw an exception on unbind in ie
Reported by: | 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>
Change History (5)
comment:1 Changed 11 years ago by
Component: | unfiled → event |
---|
comment:2 Changed 11 years ago by
Priority: | undecided → high |
---|---|
Status: | new → open |
Confirmed. Believe it happens on delete cache[ id ] in removeData
comment:3 Changed 11 years ago by
It is in removeData, the fix and test case is on the pull request linked.
comment:4 Changed 11 years ago by
Resolution: | → duplicate |
---|---|
Status: | open → closed |
Note: See
TracTickets for help on using
tickets.
I created a test case, but haven't checked it in IE8 yet. http://jsfiddle.net/timmywil/wHmw2/