Side navigation
#2707 closed bug (patchwelcome)
Opened April 17, 2008 07:17PM UTC
Closed March 31, 2011 05:37PM UTC
Last modified March 14, 2012 05:44AM UTC
Event isn't fired into an iframe
Reported by: | telega | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.2.4 |
Component: | event | Version: | 1.2.3 |
Keywords: | needsreview | Cc: | |
Blocked by: | Blocking: |
Description
Code $("iframe").contents().trigger("myevent"); doesn't fire event to iframe contentDocument.
Attachments (2)
Change History (4)
Changed October 08, 2008 06:16PM UTC by comment:1
Changed March 25, 2009 12:37PM UTC by comment:2
I've encountered the same problem. I've attached a test case. I tried appying the jquery.contextswitch.js to it but it's not working either. Any ideas? The cross-frame event just gets swallowed.
Working on IE8/FF3.0.7.
Changed November 17, 2010 01:58AM UTC by comment:3
keywords: | → needsreview |
---|---|
status: | new → open |
This could only be supported *at all* if the domains were the same, but even then I don't think we want to say we support it. There are issues with cleaning up cross domain events as well, see #7045.
Changed March 31, 2011 05:37PM UTC by comment:4
resolution: | → patchwelcome |
---|---|
status: | open → closed |
Having one frame control and trigger events across frames (parent to child or vice-versa) is not supported right now. There are several security and memory leak issues that would need to be overcome. It might be possible for us to provide hooks that allow an external plugin to do this, if you are interested please contact us.
This really cannot be considered a bug if the event was setup from within the iframe. Because of the iframe you are working with two DOMs. Outside the frame (DOM1), the event does not exist because it was setup in the iframe (DOM2). Attached is a proof of concept plugin that allows context switching. Meaning if contents() sees that the current element is an iframe, and contains jQuery, the chain is switch from the outer instance of jQuery to the inner instance. Allowing events to be trigger. Testing so far has been limited just to showing it works (FF3.0.3).