ng-click-outside
Advanced tools
Comparing version 2.0.3 to 2.1.0
@@ -22,4 +22,6 @@ "use strict"; | ||
this._el.nativeElement.removeEventListener('click', this._initOnClickBody); | ||
this._el.nativeElement.removeEventListener('touchstart', this._initOnClickBody); | ||
} | ||
this._document.body.removeEventListener('click', this._onClickBody); | ||
this._document.body.removeEventListener('touchstart', this._onClickBody); | ||
}; | ||
@@ -47,2 +49,3 @@ ClickOutsideDirective.prototype.ngOnChanges = function (changes) { | ||
this._el.nativeElement.addEventListener('click', this._initOnClickBody); | ||
this._el.nativeElement.addEventListener('touchstart', this._initOnClickBody); | ||
} | ||
@@ -56,2 +59,3 @@ else { | ||
this._document.body.addEventListener('click', this._onClickBody); | ||
this._document.body.addEventListener('touchstart', this._onClickBody); | ||
}; | ||
@@ -64,2 +68,3 @@ /** @internal */ | ||
this._document.body.removeEventListener('click', this._onClickBody); | ||
this._document.body.removeEventListener('touchstart', this._onClickBody); | ||
} | ||
@@ -66,0 +71,0 @@ } |
{ | ||
"name": "ng-click-outside", | ||
"version": "2.0.3", | ||
"version": "2.1.0", | ||
"description": "Angular 2+ directive for handling click events outside an element.", | ||
@@ -5,0 +5,0 @@ "repository": { |
@@ -38,5 +38,7 @@ import { | ||
this._el.nativeElement.removeEventListener('click', this._initOnClickBody); | ||
this._el.nativeElement.removeEventListener('touchstart', this._initOnClickBody); | ||
} | ||
this._document.body.removeEventListener('click', this._onClickBody); | ||
this._document.body.removeEventListener('touchstart', this._onClickBody); | ||
} | ||
@@ -66,2 +68,3 @@ | ||
this._el.nativeElement.addEventListener('click', this._initOnClickBody); | ||
this._el.nativeElement.addEventListener('touchstart', this._initOnClickBody); | ||
} else { | ||
@@ -75,2 +78,3 @@ this._initOnClickBody(); | ||
this._document.body.addEventListener('click', this._onClickBody); | ||
this._document.body.addEventListener('touchstart', this._onClickBody); | ||
} | ||
@@ -85,2 +89,3 @@ | ||
this._document.body.removeEventListener('click', this._onClickBody); | ||
this._document.body.removeEventListener('touchstart', this._onClickBody); | ||
} | ||
@@ -87,0 +92,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16861
230