TVOS/TVML : Menubar Template not working correctly

Hi, i found a weird bug in TVML programming guide.


https://developer.apple.com/library/content/documentation/TVMLKitJS/Conceptual/TVMLProgrammingGuide/AddingaMenuBar.html#//apple_ref/doc/uid/TP40016718-CH18-SW1



When i copy paste all code you provided down there, i get the following :


- I start from a menubar.xml , that shows my template.xml for example on the first tab.

But when i switch to the 2nd tab for example template2.xml, the whole screen is showing for 0.5-1seconds, THEN it updates the screen, means it goes grey-screen and loading the updated menuitem.


You can see it clearer when i put a setTimeout here on the handleselectevent function :


if (selectedElement.tagName == "menuItem") {

setTimeout(function() { updateMenuItem(selectedElement, targetURL);}, 2000);

}


You can see, for 2 seconds now the template is normally like before showing THEN AFTER 2 seconds its updating the menuitem = going grey, and then having all your new input. But the problem is i can still see that its flashing. Like 0,5seconds normal view, then grey screen, then updating the template.


I tested it with this template calling from the menubar.xml, in this document there has to be an image, then you can see the flashing :




<document>

<productTemplate>

<background>

<img src="Path to your image!!" />

</background>

</productTemplate>

</document>