summaryrefslogtreecommitdiff
path: root/packages/client/src/directives/tooltip.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/client/src/directives/tooltip.ts')
-rw-r--r--packages/client/src/directives/tooltip.ts18
1 files changed, 9 insertions, 9 deletions
diff --git a/packages/client/src/directives/tooltip.ts b/packages/client/src/directives/tooltip.ts
index e14ee81dff..fffde14874 100644
--- a/packages/client/src/directives/tooltip.ts
+++ b/packages/client/src/directives/tooltip.ts
@@ -21,7 +21,7 @@ export default {
self.close = () => {
if (self._close) {
- clearInterval(self.checkTimer);
+ window.clearInterval(self.checkTimer);
self._close();
self._close = null;
}
@@ -61,19 +61,19 @@ export default {
});
el.addEventListener(start, () => {
- clearTimeout(self.showTimer);
- clearTimeout(self.hideTimer);
- self.showTimer = setTimeout(self.show, delay);
+ window.clearTimeout(self.showTimer);
+ window.clearTimeout(self.hideTimer);
+ self.showTimer = window.setTimeout(self.show, delay);
}, { passive: true });
el.addEventListener(end, () => {
- clearTimeout(self.showTimer);
- clearTimeout(self.hideTimer);
- self.hideTimer = setTimeout(self.close, delay);
+ window.clearTimeout(self.showTimer);
+ window.clearTimeout(self.hideTimer);
+ self.hideTimer = window.setTimeout(self.close, delay);
}, { passive: true });
el.addEventListener('click', () => {
- clearTimeout(self.showTimer);
+ window.clearTimeout(self.showTimer);
self.close();
});
},
@@ -85,6 +85,6 @@ export default {
unmounted(el, binding, vn) {
const self = el._tooltipDirective_;
- clearInterval(self.checkTimer);
+ window.clearInterval(self.checkTimer);
},
} as Directive;