Skip to content

Commit

Permalink
Merge pull request #45 from CosticaPuntaru/master
Browse files Browse the repository at this point in the history
Update clickoutside.directive.js to check for itself rather than rely on id's
  • Loading branch information
IamAdamJowett authored Sep 20, 2016
2 parents 11a4f96 + e15d2d2 commit 5d64867
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions clickoutside.directive.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,10 @@

// loop through the available elements, looking for classes in the class list that might match and so will eat
for (element = e.target; element; element = element.parentNode) {
if (element === elem[0]) {
return;
}

id = element.id,
classNames = element.className,
l = classList.length;
Expand Down

0 comments on commit 5d64867

Please sign in to comment.