PolymerElements / app-layout

App layout elements
https://webcomponents.org/element/PolymerElements/app-layout
598 stars 311 forks source link

app-header width doesn't update #53

Closed aydun1 closed 8 years ago

aydun1 commented 8 years ago

On Chrome desktop (and possibly other browsers), in layouts featuring app-header, if the scrollbar is added or removed, the width of the header doesn't update to reflect this.

To reproduce (although a bit tedious), go to Pesto, and with developer tools, delete cards until the scrollbar disappears.

White-space will remain where the scrollbar previously was.

Resizing the browser window fixes this, as does document.querySelector('app-header').resetLayout();, for example.

Is this a bug, or should I be calling resetLayout() after making changes to my page that could affect the scrollbar?

ralcar commented 8 years ago

I have a similar problem, where im using the Pesto app as a template. I put a neon-animated-pages in, instead of the iron-pages, and whenever i resize, the app-header behaves weird. It wont strech more than a certain width, and when the drawer closes, it doesnt fill the space on the left side of the header.

Using your resetLayout helped though

blasten commented 8 years ago

That's right. you would need to call resetLayout()or implement the iron-resizable behavior https://github.com/PolymerElements/iron-resizable-behavior. That way the header would get a notification when changes to the content should update the layout.

ralcar commented 8 years ago

That totally worked, thank you!!!