jsComponent only loads when it's visible

Hello Cuba Team,

My problem is simple but confusing and I could use some clarification. When I add a jsComponent with some dependencies to a screen via XML, its dependencies are only loaded if the jsComponent is visible.

I have created a Main Screen with Top Menu and the javascript loads and works ONLY if the jsComponent is inserted below <layout> and is visible. Inserting the jsComponent under <initialLayout> does not render the component on screen but the dependencies are not loaded.

ExtMainScreen.java (4.0 KB)
ext-main-screen.xml (3.2 KB)
firebaseMainScreen.js (470 Bytes)

Just found this post by Klaus Pfeiffer, How to add a “no size” component?, which explains the problem I am having. If you are encountering the same problem as I was please read through that post as it explains why jsComponent acts the way it does.