-
Notifications
You must be signed in to change notification settings - Fork 311
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
app-drawer-layout broken content position when hidden during element initialization. #283
Comments
@coreyfarrell Generally, you'll need to call |
I've tested the change it doesn't seem to work always. I'm writing a page that uses iron-ajax to ask the server if there is an active session. iron-pages displays a login form or app-drawer-layout depending on active session or not. Your patch fixes the situation where app-drawer-layout is not visible at page load and not shown immediately - so when the user has to type account/password this is a long enough delay for your patch to work. This does not work correctly when the resize is performed immediately after page load (the initial AJAX request says we're signed in already). I'm not sure the best way to create a JSBIN demo of this since it requires the master version of app-layout. |
@coreyfarrell, you can use custom configuration to specify the branch to pull, see the polygit doc. An example jsbin: http://jsbin.com/judesavuvu/edit?html,output |
@coreyfarrell With the fix, |
@keanulee I actually am calling resetLayout to deal with the XHR response setting iron-pages.selected. In my code I have Right now I'm using the |
Description
The
app-drawer
element insideapp-drawer-layout
sits on top of content if hidden when created. This is due to width being 0 when hidden and resetLayout being called when the element is created instead of when it is shown.Live Demo
https://jsbin.com/metolohivi/edit?output
Steps to reproduce
Open the jsbin demo with a wide browser window (more than 640px). Note that you cannot see "main title" or "main content". Resize your window small enough to hide the app-draw, then resize large again. This manual resize causes 'resetLayout' to run and correct the display issue. Tested on Chrome 51.
The text was updated successfully, but these errors were encountered: