{"action":"closed","issue":{"url":"https://api.github.com/repos/harvesthq/chosen/issues/2225","labels_url":"https://api.github.com/repos/harvesthq/chosen/issues/2225/labels{/name}","comments_url":"https://api.github.com/repos/harvesthq/chosen/issues/2225/comments","events_url":"https://api.github.com/repos/harvesthq/chosen/issues/2225/events","html_url":"https://github.com/harvesthq/chosen/issues/2225","id":56791318,"number":2225,"title":"Chosen didn't check selector's  tagName","user":{"login":"ComeBurguburu","id":10062185,"avatar_url":"https://avatars.githubusercontent.com/u/10062185?v=3","gravatar_id":"","url":"https://api.github.com/users/ComeBurguburu","html_url":"https://github.com/ComeBurguburu","followers_url":"https://api.github.com/users/ComeBurguburu/followers","following_url":"https://api.github.com/users/ComeBurguburu/following{/other_user}","gists_url":"https://api.github.com/users/ComeBurguburu/gists{/gist_id}","starred_url":"https://api.github.com/users/ComeBurguburu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ComeBurguburu/subscriptions","organizations_url":"https://api.github.com/users/ComeBurguburu/orgs","repos_url":"https://api.github.com/users/ComeBurguburu/repos","events_url":"https://api.github.com/users/ComeBurguburu/events{/privacy}","received_events_url":"https://api.github.com/users/ComeBurguburu/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-02-06T09:48:14Z","updated_at":"2015-02-06T19:41:03Z","closed_at":"2015-02-06T19:41:03Z","body":"Chosen : 1.3.0\r\nBrowser : Chrome\r\nJQuery: 1.11.2\r\n\r\nI found this bug when using class as selector and enable inherit_select_classes\r\n\r\nI clone the select and call chosen on each select with the class  .chosen-select-test\r\n\r\nhttp://jsfiddle.net/97huf6tn/\r\n \r\npatch :\r\n\r\n``````````````js\r\nAbstractChosen = (function() {\r\n    function AbstractChosen(form_field, options) {\r\n        if($(form_field).tagName.toUpperCase() !== \"SELECT\") {\r\n          console.error(\"Chosen error: invalid tagName \" + form_field.selector + \" is not a select\");\r\n                $(form_field).chosen('destroy');\r\n              return;\r\n        }\r\n       if($(form_field).find(\"option\").length === 0) {\r\n             console.error(\"Chosen error: \" + form_field.selector + \" has no options's child \");\r\n            $(form_field).chosen('destroy');\r\n           return;\r\n          }\r\n     }\r\n}\r\n\r\n"}}