{"action":"created","issue":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4636","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4636/labels{/name}","comments_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4636/comments","events_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4636/events","html_url":"https://github.com/angular-ui/bootstrap/pull/4636","id":111666384,"number":4636,"title":"fix(typeahead): dangling event listeners","user":{"login":"oliversalzburg","id":1658949,"avatar_url":"https://avatars.githubusercontent.com/u/1658949?v=3","gravatar_id":"","url":"https://api.github.com/users/oliversalzburg","html_url":"https://github.com/oliversalzburg","followers_url":"https://api.github.com/users/oliversalzburg/followers","following_url":"https://api.github.com/users/oliversalzburg/following{/other_user}","gists_url":"https://api.github.com/users/oliversalzburg/gists{/gist_id}","starred_url":"https://api.github.com/users/oliversalzburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliversalzburg/subscriptions","organizations_url":"https://api.github.com/users/oliversalzburg/orgs","repos_url":"https://api.github.com/users/oliversalzburg/repos","events_url":"https://api.github.com/users/oliversalzburg/events{/privacy}","received_events_url":"https://api.github.com/users/oliversalzburg/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/component:%20typeahead","name":"component: typeahead","color":"ffffff"},{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/needs:%20PR%20test(s)","name":"needs: PR test(s)","color":"fbca04"},{"url":"https://api.github.com/repos/angular-ui/bootstrap/labels/needs:%20review","name":"needs: review","color":"5319e7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/angular-ui/bootstrap/milestones/29","html_url":"https://github.com/angular-ui/bootstrap/milestones/0.14.3","labels_url":"https://api.github.com/repos/angular-ui/bootstrap/milestones/29/labels","id":1354612,"number":29,"title":"0.14.3","description":"","creator":{"login":"wesleycho","id":1703387,"avatar_url":"https://avatars.githubusercontent.com/u/1703387?v=3","gravatar_id":"","url":"https://api.github.com/users/wesleycho","html_url":"https://github.com/wesleycho","followers_url":"https://api.github.com/users/wesleycho/followers","following_url":"https://api.github.com/users/wesleycho/following{/other_user}","gists_url":"https://api.github.com/users/wesleycho/gists{/gist_id}","starred_url":"https://api.github.com/users/wesleycho/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wesleycho/subscriptions","organizations_url":"https://api.github.com/users/wesleycho/orgs","repos_url":"https://api.github.com/users/wesleycho/repos","events_url":"https://api.github.com/users/wesleycho/events{/privacy}","received_events_url":"https://api.github.com/users/wesleycho/received_events","type":"User","site_admin":false},"open_issues":62,"closed_issues":19,"state":"open","created_at":"2015-10-14T04:35:02Z","updated_at":"2015-10-19T07:02:25Z","due_on":null,"closed_at":null},"comments":6,"created_at":"2015-10-15T17:22:58Z","updated_at":"2015-10-19T10:47:56Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/angular-ui/bootstrap/pulls/4636","html_url":"https://github.com/angular-ui/bootstrap/pull/4636","diff_url":"https://github.com/angular-ui/bootstrap/pull/4636.diff","patch_url":"https://github.com/angular-ui/bootstrap/pull/4636.patch"},"body":"Fixes #4632"},"comment":{"url":"https://api.github.com/repos/angular-ui/bootstrap/issues/comments/149183134","html_url":"https://github.com/angular-ui/bootstrap/pull/4636#issuecomment-149183134","issue_url":"https://api.github.com/repos/angular-ui/bootstrap/issues/4636","id":149183134,"user":{"login":"oliversalzburg","id":1658949,"avatar_url":"https://avatars.githubusercontent.com/u/1658949?v=3","gravatar_id":"","url":"https://api.github.com/users/oliversalzburg","html_url":"https://github.com/oliversalzburg","followers_url":"https://api.github.com/users/oliversalzburg/followers","following_url":"https://api.github.com/users/oliversalzburg/following{/other_user}","gists_url":"https://api.github.com/users/oliversalzburg/gists{/gist_id}","starred_url":"https://api.github.com/users/oliversalzburg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oliversalzburg/subscriptions","organizations_url":"https://api.github.com/users/oliversalzburg/orgs","repos_url":"https://api.github.com/users/oliversalzburg/repos","events_url":"https://api.github.com/users/oliversalzburg/events{/privacy}","received_events_url":"https://api.github.com/users/oliversalzburg/received_events","type":"User","site_admin":false},"created_at":"2015-10-19T10:47:56Z","updated_at":"2015-10-19T10:47:56Z","body":"I'd appreciate some help with these tests. There are confusing things going on here :P \r\n\r\nRight now, both tests fail for me:\r\n```\r\nChrome 45.0.2454 (Windows 8.1 0.0.0) typeahead tests event listeners should register event listeners when attached to body FAILED\r\n        Expected spy addEventListener to have been called with [ 'resize', <jasmine.any(Function)>, false ] but it was never called.\r\n            at Object.<anonymous> (d:/bootstrap/src/typeahead/test/typeahead.spec.js:1023:39)\r\n        Expected spy addEventListener to have been called with [ 'scroll', <jasmine.any(Function)>, false ] but it was never called.\r\n            at Object.<anonymous> (d:/bootstrap/src/typeahead/test/typeahead.spec.js:1024:46)\r\nChrome 45.0.2454 (Windows 8.1 0.0.0) typeahead tests event listeners should remove event listeners when attached to body FAILED\r\n        Expected spy removeEventListener to have been called with [ 'resize', <jasmine.any(Function)> ] but it was never called.\r\n            at Object.<anonymous> (d:/bootstrap/src/typeahead/test/typeahead.spec.js:1033:42)\r\n        Expected spy removeEventListener to have been called with [ 'scroll', <jasmine.any(Function)> ] but it was never called.\r\n            at Object.<anonymous> (d:/bootstrap/src/typeahead/test/typeahead.spec.js:1034:49)\r\nChrome 45.0.2454 (Windows 8.1 0.0.0): Executed 1014 of 1014 (2 FAILED) (25.43 secs / 25.22 secs)\r\n```\r\n\r\nWhen I remove the `append to body` tests (typeahead.spec.js:862`, the first test will succeed. I don't understand how that test is affecting mine.\r\n\r\nSecondly, the test for `removeEventListener` always fails. It appears that `$destroy` is never triggered in the test."}}