Skip to content

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

Closed
@jstncno

Description

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>

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions