{"action":"created","issue":{"url":"https://api.github.com/repos/CWSpear/bootstrap-hover-dropdown/issues/153","repository_url":"https://api.github.com/repos/CWSpear/bootstrap-hover-dropdown","labels_url":"https://api.github.com/repos/CWSpear/bootstrap-hover-dropdown/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/CWSpear/bootstrap-hover-dropdown/issues/153/comments","events_url":"https://api.github.com/repos/CWSpear/bootstrap-hover-dropdown/issues/153/events","html_url":"https://github.com/CWSpear/bootstrap-hover-dropdown/issues/153","id":164709679,"number":153,"title":"When the 'a' tag has child elements the hover doesnt always work because of the event.target","user":{"login":"aamjsadiq","id":1555865,"avatar_url":"https://avatars.githubusercontent.com/u/1555865?v=3","gravatar_id":"","url":"https://api.github.com/users/aamjsadiq","html_url":"https://github.com/aamjsadiq","followers_url":"https://api.github.com/users/aamjsadiq/followers","following_url":"https://api.github.com/users/aamjsadiq/following{/other_user}","gists_url":"https://api.github.com/users/aamjsadiq/gists{/gist_id}","starred_url":"https://api.github.com/users/aamjsadiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aamjsadiq/subscriptions","organizations_url":"https://api.github.com/users/aamjsadiq/orgs","repos_url":"https://api.github.com/users/aamjsadiq/repos","events_url":"https://api.github.com/users/aamjsadiq/events{/privacy}","received_events_url":"https://api.github.com/users/aamjsadiq/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-07-10T10:35:56Z","updated_at":"2016-09-06T15:23:42Z","closed_at":null,"body":"When i tried something like \r\n```\r\n<a href=\"#\">\r\n <i class=\"fa fa-icon-blah\"></i>\r\n<span>Something</span>\r\n</a>\r\n```\r\n\r\nAnd the icon and the span are block elements the hover doesnt always seems to work.\r\n\r\nI figured its because of the event.target check thats been \r\n\r\n`if(!$parent.hasClass('open') && !$parent.is(event.target)) {`\r\n\r\nAnd\r\n\r\n`if(!$parent.hasClass('open') && !$this.is(event.target) )`\r\n\r\nBy changing these to:\r\n\r\n`if(!$parent.hasClass('open') && !$.contains($parent[0], $(event.target)[0])) {`\r\n\r\nAnd\r\n\r\n`if(!$parent.hasClass('open') && !$.contains($this[0], $(event.target)[0])) {`\r\n\r\nSeems to be fixing the issue.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/CWSpear/bootstrap-hover-dropdown/issues/comments/244987075","html_url":"https://github.com/CWSpear/bootstrap-hover-dropdown/issues/153#issuecomment-244987075","issue_url":"https://api.github.com/repos/CWSpear/bootstrap-hover-dropdown/issues/153","id":244987075,"user":{"login":"aamjsadiq","id":1555865,"avatar_url":"https://avatars.githubusercontent.com/u/1555865?v=3","gravatar_id":"","url":"https://api.github.com/users/aamjsadiq","html_url":"https://github.com/aamjsadiq","followers_url":"https://api.github.com/users/aamjsadiq/followers","following_url":"https://api.github.com/users/aamjsadiq/following{/other_user}","gists_url":"https://api.github.com/users/aamjsadiq/gists{/gist_id}","starred_url":"https://api.github.com/users/aamjsadiq/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aamjsadiq/subscriptions","organizations_url":"https://api.github.com/users/aamjsadiq/orgs","repos_url":"https://api.github.com/users/aamjsadiq/repos","events_url":"https://api.github.com/users/aamjsadiq/events{/privacy}","received_events_url":"https://api.github.com/users/aamjsadiq/received_events","type":"User","site_admin":false},"created_at":"2016-09-06T15:23:42Z","updated_at":"2016-09-06T15:23:42Z","body":"Hi @CWSpear ,\r\n\r\nSorry for posting a dummy code.\r\n\r\nThe Actual code looks somewhat similar to below.\r\n\r\n```\r\n<a href=\"#\" data-toggle=\"dropdown\" data-delay=\"10\" data-hover=\"dropdown\" data-close-others=\"true\" class=\"main\">\r\n  <span class=\"icon-home\"></span>\r\n   Text For Link \r\n</a>\r\n```"}}
{"actor":{"display_login":"aamjsadiq"}}