{"action":"created","issue":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/92","labels_url":"https://api.github.com/repos/harvesthq/chosen/issues/92/labels{/name}","comments_url":"https://api.github.com/repos/harvesthq/chosen/issues/92/comments","events_url":"https://api.github.com/repos/harvesthq/chosen/issues/92/events","html_url":"https://github.com/harvesthq/chosen/issues/92","id":1299339,"number":92,"title":"if select is initially hidden, doesn't work","user":{"login":"iamnader","id":97626,"avatar_url":"https://avatars.githubusercontent.com/u/97626?v=3","gravatar_id":"","url":"https://api.github.com/users/iamnader","html_url":"https://github.com/iamnader","followers_url":"https://api.github.com/users/iamnader/followers","following_url":"https://api.github.com/users/iamnader/following{/other_user}","gists_url":"https://api.github.com/users/iamnader/gists{/gist_id}","starred_url":"https://api.github.com/users/iamnader/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iamnader/subscriptions","organizations_url":"https://api.github.com/users/iamnader/orgs","repos_url":"https://api.github.com/users/iamnader/repos","events_url":"https://api.github.com/users/iamnader/events{/privacy}","received_events_url":"https://api.github.com/users/iamnader/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/harvesthq/chosen/labels/Bug","name":"Bug","color":"e10c02"},{"url":"https://api.github.com/repos/harvesthq/chosen/labels/Has+Solution","name":"Has Solution","color":"99dd99"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":97,"created_at":"2011-07-27T22:07:30Z","updated_at":"2015-01-09T10:24:46Z","closed_at":null,"body":"This is because when setting the width it will return 0.  Using this technique works: http://www.foliotek.com/devblog/getting-the-width-of-a-hidden-element-with-jquery-using-width/\r\n\r\nThe code should check if the elmt.is(:visible) and if so use the above technique.  I'm happy to fix in a fork.  @hat is the procedure?  Just patch the coffeescript?  How do you generate js and js min?"},"comment":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/comments/69317092","html_url":"https://github.com/harvesthq/chosen/issues/92#issuecomment-69317092","issue_url":"https://api.github.com/repos/harvesthq/chosen/issues/92","id":69317092,"user":{"login":"Vinorcola","id":2178680,"avatar_url":"https://avatars.githubusercontent.com/u/2178680?v=3","gravatar_id":"","url":"https://api.github.com/users/Vinorcola","html_url":"https://github.com/Vinorcola","followers_url":"https://api.github.com/users/Vinorcola/followers","following_url":"https://api.github.com/users/Vinorcola/following{/other_user}","gists_url":"https://api.github.com/users/Vinorcola/gists{/gist_id}","starred_url":"https://api.github.com/users/Vinorcola/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Vinorcola/subscriptions","organizations_url":"https://api.github.com/users/Vinorcola/orgs","repos_url":"https://api.github.com/users/Vinorcola/repos","events_url":"https://api.github.com/users/Vinorcola/events{/privacy}","received_events_url":"https://api.github.com/users/Vinorcola/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T10:24:46Z","updated_at":"2015-01-09T10:24:46Z","body":"The problem here is that if you change the size of the window, the select always appears the same size as there was initialized. I think a better solution would be to resize the select when shown or when window is resized, rather than to guess the width it should take at initialization when it is hidden."}}