{"action":"created","issue":{"url":"https://api.github.com/repos/select2/select2/issues/2903","labels_url":"https://api.github.com/repos/select2/select2/issues/2903/labels{/name}","comments_url":"https://api.github.com/repos/select2/select2/issues/2903/comments","events_url":"https://api.github.com/repos/select2/select2/issues/2903/events","html_url":"https://github.com/select2/select2/issues/2903","id":53819705,"number":2903,"title":"Select2 4.0.0 beta bug with disabled and allowClear","user":{"login":"smzchaudary","id":6516660,"avatar_url":"https://avatars.githubusercontent.com/u/6516660?v=3","gravatar_id":"","url":"https://api.github.com/users/smzchaudary","html_url":"https://github.com/smzchaudary","followers_url":"https://api.github.com/users/smzchaudary/followers","following_url":"https://api.github.com/users/smzchaudary/following{/other_user}","gists_url":"https://api.github.com/users/smzchaudary/gists{/gist_id}","starred_url":"https://api.github.com/users/smzchaudary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smzchaudary/subscriptions","organizations_url":"https://api.github.com/users/smzchaudary/orgs","repos_url":"https://api.github.com/users/smzchaudary/repos","events_url":"https://api.github.com/users/smzchaudary/events{/privacy}","received_events_url":"https://api.github.com/users/smzchaudary/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/select2/select2/labels/bug","name":"bug","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/select2/select2/milestones/5","labels_url":"https://api.github.com/repos/select2/select2/milestones/5/labels","id":152312,"number":5,"title":"4.0","description":"This will be a complete rebuild of Select2, from the ground up.\r\n\r\n**Alpha** The Select2 4.0-alpha.1 release should be done by December 15th, 2014.\r\n\r\n**Beta:** The Select2 4.0-beta.1 release should be done by January 7th, 2014.","creator":{"login":"ivaynberg","id":150030,"avatar_url":"https://avatars.githubusercontent.com/u/150030?v=3","gravatar_id":"","url":"https://api.github.com/users/ivaynberg","html_url":"https://github.com/ivaynberg","followers_url":"https://api.github.com/users/ivaynberg/followers","following_url":"https://api.github.com/users/ivaynberg/following{/other_user}","gists_url":"https://api.github.com/users/ivaynberg/gists{/gist_id}","starred_url":"https://api.github.com/users/ivaynberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ivaynberg/subscriptions","organizations_url":"https://api.github.com/users/ivaynberg/orgs","repos_url":"https://api.github.com/users/ivaynberg/repos","events_url":"https://api.github.com/users/ivaynberg/events{/privacy}","received_events_url":"https://api.github.com/users/ivaynberg/received_events","type":"User","site_admin":false},"open_issues":24,"closed_issues":39,"state":"open","created_at":"2012-07-26T15:56:40Z","updated_at":"2015-01-09T14:43:54Z","due_on":"2015-01-17T05:00:00Z","closed_at":null},"comments":3,"created_at":"2015-01-09T00:27:43Z","updated_at":"2015-01-09T15:00:50Z","closed_at":null,"body":"See [here for an example] (http://plnkr.co/edit/6oSJMRu6cQfq079cyaF9?p=preview). Sample code also pasted below\r\n\r\nWhen the select is disabled, and select2 option for allowClear is enabled, the allowClear button is not disabled - allowing the user to clear the select2 box.\r\n\r\nAlso, while I am at it, there is a weird behavior with select2 multiple with the allowClear option.\r\n\r\n``` html\r\n<!DOCTYPE html>\r\n<html>\r\n\r\n  <head>\r\n    <script src=\"https://select2.github.io/dist/js/select2.full.js\"></script>\r\n    <link href=\"https://select2.github.io/dist/css/select2.min.css\" type=\"text/css\" rel=\"stylesheet\">\r\n  </head>\r\n\r\n  <body>\r\n    <h4>Even though this is disabled, I can hit the clear</h4>\r\n    <select disabled='true' style=\"width: 100%\">\r\n      <option value=\"0\">red</option>\r\n      <option value=\"1\">blue</option>\r\n      <option value=\"2\">green</option>\r\n      <option value=\"3\" selected='selected'>purple</option>\r\n    </select>\r\n    <h4>Even though this is disabled, I can hit the clear. Notice the weird position, as well as the hover mouse icon remains a cursor</h4>\r\n    <select disabled='true' style=\"width: 100%\" multiple=\"multiple\">\r\n      <option value=\"0\">red</option>\r\n      <option value=\"1\">blue</option>\r\n      <option value=\"2\">green</option>\r\n      <option value=\"3\" selected='selected'>purple</option>\r\n    </select>\r\n    <script type=\"text/javascript\">\r\n      $('select').select2({\r\n  placeholder: \"Select a color\",\r\n  allowClear: true\r\n});\r\n    </script>\r\n  </body>\r\n\r\n</html>\r\n```"},"comment":{"url":"https://api.github.com/repos/select2/select2/issues/comments/69344781","html_url":"https://github.com/select2/select2/issues/2903#issuecomment-69344781","issue_url":"https://api.github.com/repos/select2/select2/issues/2903","id":69344781,"user":{"login":"smzchaudary","id":6516660,"avatar_url":"https://avatars.githubusercontent.com/u/6516660?v=3","gravatar_id":"","url":"https://api.github.com/users/smzchaudary","html_url":"https://github.com/smzchaudary","followers_url":"https://api.github.com/users/smzchaudary/followers","following_url":"https://api.github.com/users/smzchaudary/following{/other_user}","gists_url":"https://api.github.com/users/smzchaudary/gists{/gist_id}","starred_url":"https://api.github.com/users/smzchaudary/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smzchaudary/subscriptions","organizations_url":"https://api.github.com/users/smzchaudary/orgs","repos_url":"https://api.github.com/users/smzchaudary/repos","events_url":"https://api.github.com/users/smzchaudary/events{/privacy}","received_events_url":"https://api.github.com/users/smzchaudary/received_events","type":"User","site_admin":false},"created_at":"2015-01-09T15:00:50Z","updated_at":"2015-01-09T15:00:50Z","body":"> I'm guessing the intention for multiple selects would be to clear out all of the selected values at once?\r\n\r\nI guess so - It was more of an 'I set the `allowClear` and made the select a `multiple` and saw something weird'. In any case, I wanted to report it - if only to document it as something that an end user shouldn't do."}}