3

I am building an SPA polymer 1.0 app that looks like this:

<iron-pages attr-for-selected="data-page"
            selected="{{page}}">
  <div data-page="home">
    <paper-header-panel mode="{{mainMode}}">
      <profile-toolbar></profile-toolbar>
      <div class="content">
        <search-menu></search-menu>
      </div>
    </paper-header-panel>
  </div>
  <div data-page="search">
    <paper-drawer-panel ...>
      ...
    </paper-drawer-panel>
  </div>
</iron-pages>

<profile-toolbar> is a custom element that contains a <paper-toolbar>. If I leave out the <paper-header-panel> it works, but there's a padding and the scrolling doesn't work right. So I added a <paper-header-panel>.

The second page also contains a <paper-header-panel> inside the drawer and works correctly, but I can't make the first page display anything if it contains a <paper-header-panel>. What am I missing?

Danielle Madeley
  • 2,616
  • 1
  • 19
  • 26
  • I also ran into this issue when trying to add routing to [this layout](https://github.com/PolymerElements/app-layout-templates/blob/master/nav-list-detail/src/x-app.html) – leoj Aug 14 '15 at 04:40

2 Answers2

1

Try adding following css class to divs that are direct parents of your paper-header-panels:

.content {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
  }
dario
  • 5,149
  • 12
  • 28
  • 32
Elon
  • 11
  • 1
0

Here is a solution you might try.

Note this open bug that has (apparently) been resolved for all except iOS (Safari).

Community
  • 1
  • 1
Let Me Tink About It
  • 15,156
  • 21
  • 98
  • 207