Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't get a <core-menu-button> component in <core-toolbar> to show child nodes #951

Closed
jstncno opened this issue Nov 21, 2014 · 2 comments
Closed

Comments

@jstncno
Copy link

jstncno commented Nov 21, 2014

Hello,

I am using the Chrome Dev Editor app to experiment with Polymer. My goal is to create a dropdown menu in the <core-toolbar>.

I put in a <core-dropdown> within a <core-menu-button> in the <core-toolbar>. When I click on the <core-menu-button>, the menu doesn't show.

My code is below (elements.html contain all import declarations for all used elements):

<!DOCTYPE html>
<html>
<head>
  <script src="bower_components/platform/platform.js"></script>
  <link rel="import" href="elements.html">
  <link rel="stylesheet" href="styles.css">
</head>

<body fullbleed layout vertical>

  <div fit horizontal center-justified layout center>
    <div class="main"><b>Hello, world!</b></div>
  </div>

  <core-header-panel mode="scroll" flex class="nav">
    <core-toolbar class="tall">

      <core-icon-button icon="menu"></core-icon-button>
      <div>LOGGER</div>
      <span flex></span>

      <core-menu-button>
          <core-icon-button icon="menu"></core-icon-button>
          <core-dropdown class="dropdown" layered>
              <core-menu>
                  <core-item>Share</core-item>
                  <core-item>Settings</core-item>
                  <core-item>Help</core-item>
              </core-menu>
          </core-dropdown>
      </core-menu-button>

    </core-toolbar>
  </core-header-panel>

</body>
</html>
@jstncno jstncno changed the title Unable to create a <core-dropdown> element in <core-toolbar> Can't get a <core-dropdown> element in <core-toolbar> to show child nodes Nov 21, 2014
@jstncno jstncno changed the title Can't get a <core-dropdown> element in <core-toolbar> to show child nodes Can't get a <core-menu-button> component in <core-toolbar> to show child nodes Nov 21, 2014
@frankiefu
Copy link
Member

It works for me in release 0.5.1, see the jsbin:
http://jsbin.com/hehinupawo/1/edit

@jstncno
Copy link
Author

jstncno commented Nov 21, 2014

I just realized that <core-menu-button> did not come packaged when developing on the Chrome Dev Editor (Preview) app, so I was importing nothing, whoops.

Thank you for your time

@jstncno jstncno closed this as completed Nov 21, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants