From 6f547a99601bf01295d94ca77f876ada280f5bf2 Mon Sep 17 00:00:00 2001
From: Hendrik Leppelsack <hendrik@leppelsack.de>
Date: Wed, 8 Jul 2015 10:53:17 +0200
Subject: [PATCH] fix tipsy not updating on reinitialization

---
 core/js/js.js | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/core/js/js.js b/core/js/js.js
index 50081209979..60fcec2350b 100644
--- a/core/js/js.js
+++ b/core/js/js.js
@@ -1757,7 +1757,6 @@ jQuery.fn.tipsy = function(argument) {
 			trigger: 'hover',
 			html: false
 		};
-		// tooltip direction
 		if(argument.gravity) {
 			switch(argument.gravity) {
 				case 'n':
@@ -1793,7 +1792,11 @@ jQuery.fn.tipsy = function(argument) {
 		if(argument.title) {
 			options.title = argument.title;
 		}
+		// destroy old tooltip in case the title has changed
+		jQuery.fn.tooltip.call(this, 'destroy');
 		jQuery.fn.tooltip.call(this, options);
+	} else {
+		this.tooltip(argument);
+		jQuery.fn.tooltip.call(this, argument);
 	}
-	jQuery.fn.tooltip.call(this, argument);
 }
-- 
GitLab