From f7cb8bc01453fa2ed7c8dcbf4cfa7f623bfe3e14 Mon Sep 17 00:00:00 2001 From: Di Huang Date: Fri, 4 Sep 2015 13:44:05 -0400 Subject: [PATCH] fix(tooltip): set `visibility: hidden` to avoid flicker - Set `visibility: hidden` and then to `visible` to avoid flicker from positional movement Closes #4342 --- src/tooltip/tooltip.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index 4987d0c19f..984f429a3b 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -146,6 +146,8 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position']) ttCss.width = ttBox.width + 'px'; ttCss.height = ttBox.height + 'px'; + + ttCss.visibility = 'visible'; // Now set the calculated positioning and size. tooltip.css(ttCss); @@ -225,7 +227,7 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position']) ttScope.$apply(); // digest required as $apply is not called } - tooltip.css({ display: 'block' }); + tooltip.css({ display: 'block', visibility: 'hidden' }); positionTooltip(); }