{"action":"created","issue":{"url":"https://api.github.com/repos/PolymerElements/app-layout/issues/283","repository_url":"https://api.github.com/repos/PolymerElements/app-layout","labels_url":"https://api.github.com/repos/PolymerElements/app-layout/issues/283/labels{/name}","comments_url":"https://api.github.com/repos/PolymerElements/app-layout/issues/283/comments","events_url":"https://api.github.com/repos/PolymerElements/app-layout/issues/283/events","html_url":"https://github.com/PolymerElements/app-layout/issues/283","id":168426885,"number":283,"title":"app-drawer-layout broken content position when hidden during element initialization.","user":{"login":"coreyfarrell","id":903597,"avatar_url":"https://avatars.githubusercontent.com/u/903597?v=3","gravatar_id":"","url":"https://api.github.com/users/coreyfarrell","html_url":"https://github.com/coreyfarrell","followers_url":"https://api.github.com/users/coreyfarrell/followers","following_url":"https://api.github.com/users/coreyfarrell/following{/other_user}","gists_url":"https://api.github.com/users/coreyfarrell/gists{/gist_id}","starred_url":"https://api.github.com/users/coreyfarrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreyfarrell/subscriptions","organizations_url":"https://api.github.com/users/coreyfarrell/orgs","repos_url":"https://api.github.com/users/coreyfarrell/repos","events_url":"https://api.github.com/users/coreyfarrell/events{/privacy}","received_events_url":"https://api.github.com/users/coreyfarrell/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/PolymerElements/app-layout/labels/p1%20-%20backlog","name":"p1 - backlog","color":"d1c753"}],"state":"closed","locked":false,"assignee":{"login":"keanulee","id":1319720,"avatar_url":"https://avatars.githubusercontent.com/u/1319720?v=3","gravatar_id":"","url":"https://api.github.com/users/keanulee","html_url":"https://github.com/keanulee","followers_url":"https://api.github.com/users/keanulee/followers","following_url":"https://api.github.com/users/keanulee/following{/other_user}","gists_url":"https://api.github.com/users/keanulee/gists{/gist_id}","starred_url":"https://api.github.com/users/keanulee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keanulee/subscriptions","organizations_url":"https://api.github.com/users/keanulee/orgs","repos_url":"https://api.github.com/users/keanulee/repos","events_url":"https://api.github.com/users/keanulee/events{/privacy}","received_events_url":"https://api.github.com/users/keanulee/received_events","type":"User","site_admin":false},"assignees":[{"login":"keanulee","id":1319720,"avatar_url":"https://avatars.githubusercontent.com/u/1319720?v=3","gravatar_id":"","url":"https://api.github.com/users/keanulee","html_url":"https://github.com/keanulee","followers_url":"https://api.github.com/users/keanulee/followers","following_url":"https://api.github.com/users/keanulee/following{/other_user}","gists_url":"https://api.github.com/users/keanulee/gists{/gist_id}","starred_url":"https://api.github.com/users/keanulee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/keanulee/subscriptions","organizations_url":"https://api.github.com/users/keanulee/orgs","repos_url":"https://api.github.com/users/keanulee/repos","events_url":"https://api.github.com/users/keanulee/events{/privacy}","received_events_url":"https://api.github.com/users/keanulee/received_events","type":"User","site_admin":false}],"milestone":null,"comments":5,"created_at":"2016-07-29T22:28:46Z","updated_at":"2016-08-03T18:56:06Z","closed_at":"2016-08-01T23:14:48Z","body":"### Description\r\nThe `app-drawer` element inside `app-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.\r\n\r\n### Live Demo\r\nhttps://jsbin.com/metolohivi/edit?output\r\n\r\n### Steps to reproduce\r\nOpen 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."},"comment":{"url":"https://api.github.com/repos/PolymerElements/app-layout/issues/comments/237335854","html_url":"https://github.com/PolymerElements/app-layout/issues/283#issuecomment-237335854","issue_url":"https://api.github.com/repos/PolymerElements/app-layout/issues/283","id":237335854,"user":{"login":"coreyfarrell","id":903597,"avatar_url":"https://avatars.githubusercontent.com/u/903597?v=3","gravatar_id":"","url":"https://api.github.com/users/coreyfarrell","html_url":"https://github.com/coreyfarrell","followers_url":"https://api.github.com/users/coreyfarrell/followers","following_url":"https://api.github.com/users/coreyfarrell/following{/other_user}","gists_url":"https://api.github.com/users/coreyfarrell/gists{/gist_id}","starred_url":"https://api.github.com/users/coreyfarrell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/coreyfarrell/subscriptions","organizations_url":"https://api.github.com/users/coreyfarrell/orgs","repos_url":"https://api.github.com/users/coreyfarrell/repos","events_url":"https://api.github.com/users/coreyfarrell/events{/privacy}","received_events_url":"https://api.github.com/users/coreyfarrell/received_events","type":"User","site_admin":false},"created_at":"2016-08-03T18:56:06Z","updated_at":"2016-08-03T18:56:06Z","body":"@keanulee I actually am calling resetLayout to deal with the XHR response setting iron-pages.selected.  In my code I have `<iron-pages selected=\"{{_activePage(sessionInfo)}}\">`.  Using a timer to run resetLayout from _activePage was not reliable, the required delay was not consistent.\r\n\r\nRight now I'm using the `iron-select` event, using setTimeout with a 0ms delay to call resetLayout.  This seems to work reliably, I assume the setTimeout with 0ms delay allows display to refresh in the current thread before we read the drawer width."}}
{"actor":{"display_login":"coreyfarrell"}}