{"action":"created","issue":{"url":"https://api.github.com/repos/CreativeIT/getmdl-select/issues/34","repository_url":"https://api.github.com/repos/CreativeIT/getmdl-select","labels_url":"https://api.github.com/repos/CreativeIT/getmdl-select/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/CreativeIT/getmdl-select/issues/34/comments","events_url":"https://api.github.com/repos/CreativeIT/getmdl-select/issues/34/events","html_url":"https://github.com/CreativeIT/getmdl-select/issues/34","id":174587048,"number":34,"title":"Width is 0px if component is not visible on page load","user":{"login":"garnold","id":83754,"avatar_url":"https://avatars.githubusercontent.com/u/83754?v=3","gravatar_id":"","url":"https://api.github.com/users/garnold","html_url":"https://github.com/garnold","followers_url":"https://api.github.com/users/garnold/followers","following_url":"https://api.github.com/users/garnold/following{/other_user}","gists_url":"https://api.github.com/users/garnold/gists{/gist_id}","starred_url":"https://api.github.com/users/garnold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/garnold/subscriptions","organizations_url":"https://api.github.com/users/garnold/orgs","repos_url":"https://api.github.com/users/garnold/repos","events_url":"https://api.github.com/users/garnold/events{/privacy}","received_events_url":"https://api.github.com/users/garnold/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-09-01T17:59:28Z","updated_at":"2016-09-05T14:42:41Z","closed_at":"2016-09-05T14:42:41Z","body":"We are using the getmdl-select component within tab panels.  If the component is contained within the active tab panel on page load, all is well.  However, if the component is contained within an inactive tab panel, the width of the component is 0px. \r\n\r\nInterestingly enough, if I remove the `defer` attribute from the script element, the component works as expected in both active and inactive tab panels.\r\n\r\nExample HTML attached.\r\n\r\n[getmdl-select-tabs.html.txt](https://github.com/CreativeIT/getmdl-select/files/450385/getmdl-select-tabs.html.txt)\r\n"},"comment":{"url":"https://api.github.com/repos/CreativeIT/getmdl-select/issues/comments/244762567","html_url":"https://github.com/CreativeIT/getmdl-select/issues/34#issuecomment-244762567","issue_url":"https://api.github.com/repos/CreativeIT/getmdl-select/issues/34","id":244762567,"user":{"login":"franckevva","id":3253797,"avatar_url":"https://avatars.githubusercontent.com/u/3253797?v=3","gravatar_id":"","url":"https://api.github.com/users/franckevva","html_url":"https://github.com/franckevva","followers_url":"https://api.github.com/users/franckevva/followers","following_url":"https://api.github.com/users/franckevva/following{/other_user}","gists_url":"https://api.github.com/users/franckevva/gists{/gist_id}","starred_url":"https://api.github.com/users/franckevva/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franckevva/subscriptions","organizations_url":"https://api.github.com/users/franckevva/orgs","repos_url":"https://api.github.com/users/franckevva/repos","events_url":"https://api.github.com/users/franckevva/events{/privacy}","received_events_url":"https://api.github.com/users/franckevva/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T14:42:41Z","updated_at":"2016-09-05T14:42:41Z","body":"@garnold  I caught your problem. This is because initially runs mdl script, then ours. By this time the second tab `display: none`, which is why select not be drawn. Now your problem is solved, but the width of the element will be constant. \r\nYou can define the width with dynamic initialization like this `getmdlSelect.init('#mySelect', 500);`, where '500' is your width. "}}
{"actor":{"display_login":"franckevva"}}