marko-js-archive / marko-widgets

[LEGACY] Module to support binding of behavior to rendered UI components rendered on the server or client
http://v3.markojs.com/docs/marko-widgets/
MIT License
141 stars 40 forks source link

Widget fails to load properly on initial page load only #98

Closed phoenix727 closed 8 years ago

phoenix727 commented 8 years ago

Page does not work the first time after the server is started, but works after this initial load.

patrick-steele-idem commented 8 years ago

After investigating this issue offline I found that there is a bug related to asynchronous rendering and widget initialization order. A nested widget that renders asynchronously is getting initialized after the parent widget because of a bug in marko-widgets. In this particular use case, the rendering is only asynchronous the first time and after the first time it is cached and rendered synchronously.

The root cause is due to a typo in preserve the widget stack when beginning an asynchronous rendering.

patrick-steele-idem commented 8 years ago

New version published: marko-widgets@5.0.2