summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-09-30 03:07:47 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-09-30 03:07:47 +0900
commit18fa317ee70b5d570637407a3f8a2888ab27cb6f (patch)
tree27a843e58394d2db0ab7168a8f37487ff3d2418c
parentfix: truncate image descriptions (#7699) (diff)
downloadsharkey-18fa317ee70b5d570637407a3f8a2888ab27cb6f.tar.gz
sharkey-18fa317ee70b5d570637407a3f8a2888ab27cb6f.tar.bz2
sharkey-18fa317ee70b5d570637407a3f8a2888ab27cb6f.zip
fix bug
-rw-r--r--src/client/directives/tooltip.ts9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/client/directives/tooltip.ts b/src/client/directives/tooltip.ts
index ee690558af..32d137b2e2 100644
--- a/src/client/directives/tooltip.ts
+++ b/src/client/directives/tooltip.ts
@@ -36,7 +36,7 @@ export default {
});
}
- const show = e => {
+ self.show = () => {
if (!document.body.contains(el)) return;
if (self._close) return;
if (self.text == null) return;
@@ -60,7 +60,7 @@ export default {
el.addEventListener(start, () => {
clearTimeout(self.showTimer);
clearTimeout(self.hideTimer);
- self.showTimer = setTimeout(show, delay);
+ self.showTimer = setTimeout(self.show, delay);
}, { passive: true });
el.addEventListener(end, () => {
@@ -75,6 +75,11 @@ export default {
});
},
+ updated(el, binding) {
+ const self = el._tooltipDirective_;
+ self.text = binding.value as string;
+ },
+
unmounted(el, binding, vn) {
const self = el._tooltipDirective_;
clearInterval(self.checkTimer);