From e15d2d2bf2f2d2b00c501bdc6298938d8ee463c0 Mon Sep 17 00:00:00 2001 From: Tica Costica Puntaru Date: Thu, 14 Jul 2016 11:28:26 +0300 Subject: [PATCH] Update clickoutside.directive.js fix clicking inside element --- clickoutside.directive.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/clickoutside.directive.js b/clickoutside.directive.js index f62a0d3..9953820 100644 --- a/clickoutside.directive.js +++ b/clickoutside.directive.js @@ -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;