From fc8a1fb6ad7a48e80e1db096786e6023d67dc624 Mon Sep 17 00:00:00 2001 From: Fabrice Daugan Date: Sat, 16 Apr 2016 20:52:14 +0200 Subject: [PATCH] Fix tooltip width and position when content change When the tooltip is on the border right for sample, and the mouse pointer is moved over another region implying another wider content, a scollbar may appear. This is due to the computation of tooltips before the content update. This PR ensures the size is computed after the content is updated. --- src/interact.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/interact.js b/src/interact.js index 25b338f..b2d857e 100644 --- a/src/interact.js +++ b/src/interact.js @@ -88,10 +88,10 @@ this.currentPageX = e.pageX; this.currentPageY = e.pageY; this.currentEl = e.target; + this.updateDisplay(); if (this.tooltip) { this.tooltip.updatePosition(e.pageX, e.pageY); } - this.updateDisplay(); }, updateDisplay: function () {