Onyx Menu will not render when contained inside Enyo.Panels

I just converted my app to use panels, but this breaks my Onyx Menu.

I have a simple Panel Kind, which contains two different views:
enyo.kind({
	name: "BasePanels",
	kind: "Panels",
	draggable: false,
	arrangerKind: "CardSlideInArranger",
	components: [
		{name: "main", kind: "MainView"},
		{name: "article", kind: "ArticleView"}
	],
});
In the "MainView" kind, I have a Toolbar, which contains a Menu:
enyo.kind({
	name: "MainView",
	kind: "FittableRows",
	fit: true,
	
	components:[
		{kind: "onyx.Toolbar", layoutKind: "FittableColumnsLayout", noStretch: true, components: [
			{kind: "onyx.MenuDecorator", components: [
				{kind: "onyx.IconButton", src: "assets/menu-icon.png"},
			    {kind: "onyx.Menu", components: [
        			{content: "Logout"},
    			]}
			]},
		]},

	],
})
When I render the MainView kind directly, the onyx.Menu appears as expected, but when I encapsulate it in the Panels, the menu no longer appears. Is there some sort of quirk with Panels that I need to be aware of?

Comments

  • edited June 2014
    That's odd, which version of Enyo are you using? It seems to work fine with the nightly, and I've also tried it against 2.4 (and 2.2): http://jsfiddle.net/aarontam/dn5pV/
  • Sorry for taking so long to get back to this - didn't get alerted on the thread. Anyways, I'm using 2.4.
  • I wasn't able to repro with 2.4. Are you able to create a fiddle that shows this issue? Thanks!
  • Finally had time to take a look at this issue this morning. When I set up the fiddle (using nightly) everything worked properly - I could not repro the issue.

    So, I fiddled with my menu code a bit (removing the ontap handler that I had been using on the the MenuDecorator to test individual bits of functionality), and it worked properly. I don't know what changed, but it tests as working in a couple of Panels.

    It may have been a browser state issue of some sort. The browser has been reset (cache/cookies/etc.) a couple of times since I last tested this.

    Thanks for the help!
Sign In or Register to comment.