Famous / famous

This repo is being deprecated. Please check out http://github.com/famous/engine
http://deprecated.famous.org
Mozilla Public License 2.0
6.26k stars 686 forks source link

Fix for setContent not doing anything because the surface was recalled from the DOM the next render cycle. #674

Closed IjzerenHein closed 8 years ago

michaelobriena commented 9 years ago

Can you elaborate on this? Not sure the exact breaking condition.

jd-carroll commented 9 years ago

I'm with @michaelobriena, please see my comment: https://github.com/Famous/famous/issues/673#issuecomment-89352486

IjzerenHein commented 9 years ago

I'll provide you with a test case which shows the problem in action.

IjzerenHein commented 9 years ago

Hi, I've created a demo for this, which demonstrates the problem: http://gloey.nl/apps/setContent/

To reproduce, press the "Trigger bug: Set Content, Hide and show after 2 secs" button. This button executes two actions at once:

After 2 seconds, the surface is re-shown, and you would expect that the content that was set using 'setContent' be shown in the surface. But that is not the case and instead the content is shown that was last in the DOM.

Interesting note: I tried reproducing this problem first with a RenderController, but was unable to. After some investigation I noticed that the RenderController still shows the content for at least 1 render-cycle after .hide({duration: 0}) was executed on the render-controller and thus causes this bug not to be triggered.

michaelobriena commented 9 years ago

Thanks for the test case. This makes sense. @TheAlphaNerd This is mergable.

MylesBorins commented 9 years ago

@michaelobriena which milestone?

jd-carroll commented 9 years ago

Are we certain that the surface will be recalled successfully after preventing the initial recall?

On Wed, Apr 8, 2015 at 2:37 AM, Myles Borins notifications@github.com wrote:

@michaelobriena https://github.com/michaelobriena which milestone?

— Reply to this email directly or view it on GitHub https://github.com/Famous/famous/pull/674#issuecomment-90820521.

MylesBorins commented 8 years ago

@michaelobriena can you close this?