From e584a69710a89490684f9486f786c25b60068880 Mon Sep 17 00:00:00 2001 From: Winnie Hellmann Date: Sat, 20 Oct 2018 12:01:14 +0200 Subject: Update the content of visible tooltips --- app/assets/javascripts/vue_shared/directives/tooltip.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/app/assets/javascripts/vue_shared/directives/tooltip.js b/app/assets/javascripts/vue_shared/directives/tooltip.js index 4f2412ce520..549d27e96d9 100644 --- a/app/assets/javascripts/vue_shared/directives/tooltip.js +++ b/app/assets/javascripts/vue_shared/directives/tooltip.js @@ -9,6 +9,14 @@ export default { componentUpdated(el) { $(el).tooltip('_fixTitle'); + + // update visible tooltips + const tooltipInstance = $(el).data('bs.tooltip'); + const tip = tooltipInstance.getTipElement(); + tooltipInstance.setElementContent( + $(tip.querySelectorAll('.tooltip-inner')), + tooltipInstance.getTitle(), + ); }, unbind(el) { -- cgit v1.2.1