render() and content not showing

edited May 2013 in Enyo 2
I'm creating content dynamically with
and calling
after. The content is being rendered into the dom but is not visible. It becomes visible when I try to resize browser window manually.

Content is defined as:
{kind:"Scroller", name:"content", horizontal: "hidden", fit:true, classes:"main-content onyx enyo-unselectable"}
It is happening only when app loads first time after this it works ok.

Anyone encountered such issue before ?



  • Ok, so the content height is actually "0" at first, that's why it is not visible. Setting css height: 100% helps a bit but some content is cut off, when browser window is resized it goes to normal.
  • Since it's fit:true, that's implying it's inside a fittable. Those will measure the content size when created or resized, but not otherwise. After you do this.$.content.render(), try this.$.content.resized() which will send the various events that should trigger a re-layout.
  • Forgot to mention, I'm already doing so and it's still the same.
  • Ok, when I call .resized() on parent of content problem goes away.
Sign In or Register to comment.