diff --git a/src/tooltip.directive.ts b/src/tooltip.directive.ts index f7bbebf..c9ee5b5 100644 --- a/src/tooltip.directive.ts +++ b/src/tooltip.directive.ts @@ -59,7 +59,7 @@ export class TooltipDirective{ } this.showDelay = this.delay || this.showDelay; - this.showTimeoutId = setTimeout(() => { + this.showTimeoutId = window.setTimeout(() => { if (this.tooltip){ this.tooltip.className += " ng-tooltip-show"; } @@ -73,7 +73,7 @@ export class TooltipDirective{ if (this.tooltip){ this.tooltip.classList.remove("ng-tooltip-show"); - this.hideTimeoutId = setTimeout(() => { + this.hideTimeoutId = window.setTimeout(() => { this.tooltip.parentNode.removeChild(this.tooltip); this.tooltip = null; }, this.hideDelay); @@ -111,4 +111,4 @@ export class TooltipDirective{ this.tooltip.style.top = (this.elemPosition.top + scrollY) + elemHeight/2 - this.tooltip.clientHeight/2+'px'; } } -} \ No newline at end of file +}