{"action":"opened","issue":{"url":"https://api.github.com/repos/TheSharpieOne/angular-off-click/issues/51","repository_url":"https://api.github.com/repos/TheSharpieOne/angular-off-click","labels_url":"https://api.github.com/repos/TheSharpieOne/angular-off-click/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/TheSharpieOne/angular-off-click/issues/51/comments","events_url":"https://api.github.com/repos/TheSharpieOne/angular-off-click/issues/51/events","html_url":"https://github.com/TheSharpieOne/angular-off-click/issues/51","id":193803656,"number":51,"title":"Issue with off-click-filter (again, I know)","user":{"login":"marc-antoinepelletier","id":3964211,"avatar_url":"https://avatars.githubusercontent.com/u/3964211?v=3","gravatar_id":"","url":"https://api.github.com/users/marc-antoinepelletier","html_url":"https://github.com/marc-antoinepelletier","followers_url":"https://api.github.com/users/marc-antoinepelletier/followers","following_url":"https://api.github.com/users/marc-antoinepelletier/following{/other_user}","gists_url":"https://api.github.com/users/marc-antoinepelletier/gists{/gist_id}","starred_url":"https://api.github.com/users/marc-antoinepelletier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marc-antoinepelletier/subscriptions","organizations_url":"https://api.github.com/users/marc-antoinepelletier/orgs","repos_url":"https://api.github.com/users/marc-antoinepelletier/repos","events_url":"https://api.github.com/users/marc-antoinepelletier/events{/privacy}","received_events_url":"https://api.github.com/users/marc-antoinepelletier/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-06T15:35:30Z","updated_at":"2016-12-06T15:35:30Z","closed_at":null,"body":"Hey,\r\n\r\nThanks for this directive, it is very handy. Although I have an issue with the `off-click-filter` : \r\n\r\nThis is my element that contain an ng-repeat of item (it's a popup menu) :\r\n`<div id=\"fs-create-menu\" off-click=\"fs.closePanel()\" off-click-filter=\"'#fs-file-creator-launcher'\"></div>`\r\n\r\nWhich open using a button like : \r\n`<button id=\"fs-file-creator-launcher\"><span>Some text</span></button>`\r\n\r\nJust for matter of testing as you can see, I have set the id of the button in the `off-click-filter`, so it shouldn't trigger the `off-click` if I click on the button.\r\n\r\nBut then it does.\r\n\r\nI debugged your source code and tried to understand what went wrong, I can see my filter properly store in the `OffClickFilterCache` as an object : \r\n\r\n`\r\n{\r\n  \"#fs-file-creator-launcher\": [\r\n    {\r\n      \"jQuery224087994817664495642\": {\r\n        \"$appsMenuController\": {}\r\n      },\r\n      \"$$hashKey\": \"object:856\",\r\n      \"$$ngAnimateParentKey\": 1\r\n    }\r\n  ]\r\n}\r\n`\r\n\r\nSo far so good.\r\n\r\nAnd then I come across here https://github.com/TheSharpieOne/angular-off-click/blob/master/dist/angular-off-click.js#L50\r\n\r\nWhat does `OffClickFilterCache['*']` should return you ? Because in my case it's `undefined`. I assume it should return the list of filter passed to `off-click-filter`, but here I have nothing..\r\nAs you could guess, the filters var is `[]`.\r\n\r\nIs there something wrong with my logic ? or is there something wrong with the package ? \r\n\r\nAlso another thing is that you only compare the `target` element, but then if you want to filter an entire DOM element, you would need to filter ALL the ids and class ? \r\n"}}
{"actor":{"display_login":"marc-antoinepelletier"}}