{"action":"opened","issue":{"url":"https://api.github.com/repos/ehynds/jquery-ui-multiselect-widget/issues/643","repository_url":"https://api.github.com/repos/ehynds/jquery-ui-multiselect-widget","labels_url":"https://api.github.com/repos/ehynds/jquery-ui-multiselect-widget/issues/643/labels{/name}","comments_url":"https://api.github.com/repos/ehynds/jquery-ui-multiselect-widget/issues/643/comments","events_url":"https://api.github.com/repos/ehynds/jquery-ui-multiselect-widget/issues/643/events","html_url":"https://github.com/ehynds/jquery-ui-multiselect-widget/issues/643","id":153040436,"number":643,"title":"multiselect button & widget width is not properly calculated in some situations","user":{"login":"Lukapt","id":4490627,"avatar_url":"https://avatars.githubusercontent.com/u/4490627?v=3","gravatar_id":"","url":"https://api.github.com/users/Lukapt","html_url":"https://github.com/Lukapt","followers_url":"https://api.github.com/users/Lukapt/followers","following_url":"https://api.github.com/users/Lukapt/following{/other_user}","gists_url":"https://api.github.com/users/Lukapt/gists{/gist_id}","starred_url":"https://api.github.com/users/Lukapt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Lukapt/subscriptions","organizations_url":"https://api.github.com/users/Lukapt/orgs","repos_url":"https://api.github.com/users/Lukapt/repos","events_url":"https://api.github.com/users/Lukapt/events{/privacy}","received_events_url":"https://api.github.com/users/Lukapt/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-05-04T15:24:20Z","updated_at":"2016-05-04T15:24:20Z","closed_at":null,"body":"Hi,\r\n\r\nFirst of all, congratulations for the widget.\r\n\r\n**Problem 1:**\r\nI'm not absolutely sure this is a multiselect issue/responsibility or just a consequence of jQuery element width calculation.\r\n\r\nThe problem is that the multiselect width is not being properly calculated when using a select element with width = 100% inside a table.\r\n\r\nAs I understood while debugging this is because the select element width is different when the element is hidden. In fact this is well documented in http://api.jquery.com/outerwidth/\r\n\r\n> The value reported by .outerWidth() is not guaranteed to be accurate when the element or its parent is hidden. To get an accurate value, ensure the element is visible before using .outerWidth() (...)\r\n\r\nFrom the multiselect widget perspective it would not make sense to just hide the source select element when the width was calculated to avoid this behavior?\r\n\r\nHere is the jsfiddle: https://jsfiddle.net/dr7d7h84/\r\n\r\n---------------------------\r\n\r\n**Problem 2:**\r\nAdditionally I don't think that the widget width is being properly calculated even for \"normal\" scenarios. Again, I think this might be a jQuery problem (please see https://github.com/jquery/jquery/issues/1712).\r\n\r\nHere is the jsfiddle for this scenario: https://jsfiddle.net/ccbe87qa/\r\n\r\nAs you can see the widget button width is not the same has the original select width. Is this the expected behavior?\r\n\r\n\r\nThanks"}}