[
https://issues.apache.org/jira/browse/SHINDIG-1965?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13901760#comment-13901760
]
Stanton Sievers commented on SHINDIG-1965:
------------------------------------------
I'm thinking I might go back to the approach of ensuring that
osapi.container.GadgetSite.prototype.onRender won't dispose the
currentGadgetHolder_ if there is no loadingGadgetHolder_ present (as there
would be in a double buffering scenario).
I'd like to also have container.js keep a map of sites that it has already
fired onRender events for. This way, we're not needlessly firing lifecycle
events.
With both of these changes, I think the issue would be resolved the right way.
I'll try to get these changes mocked up within the next week or so.
> iframe onload events firing more than once cause gadget iframe to empty
> -----------------------------------------------------------------------
>
> Key: SHINDIG-1965
> URL: https://issues.apache.org/jira/browse/SHINDIG-1965
> Project: Shindig
> Issue Type: Bug
> Affects Versions: 2.5.0-update1
> Reporter: Stanton Sievers
> Assignee: Stanton Sievers
> Fix For: 2.5.1
>
>
> In the case a gadget iframe is re-parented, the iframe's onload handler will
> fire again. This causes osapi.container.GadgetSite.prototype.onRender to
> call remove() on currentGadgetHolder_ because it is not null.
> This is easily reproducible in Apache Rave since it upgraded to Shindig
> 2.5.0-update1. Simply drag-and-drop a gadget on the page and its contents
> will disappear.
> I think GadgetSite.onRender should either guard against this scenario by
> checking to see if loadingGadgetHolder_ is set before clearing out
> currentGadgetHolder_ or we should remove the onload handler entirely from the
> iframe once it has fired once.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)