{"action":"created","issue":{"url":"https://api.github.com/repos/select2/select2/issues/3748","repository_url":"https://api.github.com/repos/select2/select2","labels_url":"https://api.github.com/repos/select2/select2/issues/3748/labels{/name}","comments_url":"https://api.github.com/repos/select2/select2/issues/3748/comments","events_url":"https://api.github.com/repos/select2/select2/issues/3748/events","html_url":"https://github.com/select2/select2/issues/3748","id":105383988,"number":3748,"title":"dropdownAutoWidth behaves differently between select 3.5.2 and 4.0.0","user":{"login":"tbgcrew","id":3520141,"avatar_url":"https://avatars.githubusercontent.com/u/3520141?v=3","gravatar_id":"","url":"https://api.github.com/users/tbgcrew","html_url":"https://github.com/tbgcrew","followers_url":"https://api.github.com/users/tbgcrew/followers","following_url":"https://api.github.com/users/tbgcrew/following{/other_user}","gists_url":"https://api.github.com/users/tbgcrew/gists{/gist_id}","starred_url":"https://api.github.com/users/tbgcrew/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbgcrew/subscriptions","organizations_url":"https://api.github.com/users/tbgcrew/orgs","repos_url":"https://api.github.com/users/tbgcrew/repos","events_url":"https://api.github.com/users/tbgcrew/events{/privacy}","received_events_url":"https://api.github.com/users/tbgcrew/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/select2/select2/labels/4.x","name":"4.x","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-09-08T13:46:13Z","updated_at":"2016-03-17T01:19:47Z","closed_at":null,"body":"If you set dropdownAutoWidth option to true on 4.0.0 it behaves differently to how it works in 3.5.2.\r\n\r\nIn 4.0.0 seemingly nothing happens... the content of the dropdown has it's style set to \"width: auto\", and the drop down box size matches the size of the select element, not the size of the content of dropdown. (which is what happens if dropdownAutoWidth isn't set)\r\n![image](https://cloud.githubusercontent.com/assets/3520141/9736301/3c0b1f38-5638-11e5-9c34-9bcd0b82dd28.png)\r\n\r\n\r\nIn 3.5.2, the dropdown changes size to match the width of the content of the dropdown\r\n![image](https://cloud.githubusercontent.com/assets/3520141/9736310/4c564ea8-5638-11e5-99f3-3440900c0b94.png)\r\n\r\n\r\nThe 3.5.2 behaviour is desired\r\n\r\n3.5.2 fiddle: http://jsfiddle.net/jEADR/2028/ (expected behaviour)\r\n4.0.0 fiddle: http://jsfiddle.net/jEADR/2029/\r\n\r\nThis happens regardless of which DropdownAdapter you use."},"comment":{"url":"https://api.github.com/repos/select2/select2/issues/comments/197634943","html_url":"https://github.com/select2/select2/issues/3748#issuecomment-197634943","issue_url":"https://api.github.com/repos/select2/select2/issues/3748","id":197634943,"user":{"login":"tiffon","id":2304337,"avatar_url":"https://avatars.githubusercontent.com/u/2304337?v=3","gravatar_id":"","url":"https://api.github.com/users/tiffon","html_url":"https://github.com/tiffon","followers_url":"https://api.github.com/users/tiffon/followers","following_url":"https://api.github.com/users/tiffon/following{/other_user}","gists_url":"https://api.github.com/users/tiffon/gists{/gist_id}","starred_url":"https://api.github.com/users/tiffon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tiffon/subscriptions","organizations_url":"https://api.github.com/users/tiffon/orgs","repos_url":"https://api.github.com/users/tiffon/repos","events_url":"https://api.github.com/users/tiffon/events{/privacy}","received_events_url":"https://api.github.com/users/tiffon/received_events","type":"User","site_admin":false},"created_at":"2016-03-17T01:19:47Z","updated_at":"2016-03-17T01:19:47Z","body":"I'm also running into this issue. Any known workarounds?"}}