-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/17499/
-----------------------------------------------------------

(Updated Feb. 18, 2014, 12:44 p.m.)


Review request for shindig.


Bugs: SHINDIG-1965
    https://issues.apache.org/jira/browse/SHINDIG-1965


Repository: shindig


Description
-------

The chosen solution seemed like the most straightforward.  One other I 
considered was removing the onload event from the iframe, but given that this 
event is managed at the site_holder level, I decided it would be too 
complicated to propagate the fact that the onload event was fired down to the 
holder to then remove.

>From JIRA:

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. 


Diffs (updated)
-----

  
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container.site.gadget/gadget_site.js
 1568772 
  
http://svn.apache.org/repos/asf/shindig/trunk/features/src/main/javascript/features/container/container.js
 1568772 

Diff: https://reviews.apache.org/r/17499/diff/


Testing
-------

Tested in Apache Rave by dragging and dropping gadgets on the page.

Verified that gadgets still render in the sample common container in Shindig, 
including pubsub2 gadgets.


Thanks,

Stanton Sievers

Reply via email to