From af9d18df666a66a7c40c5409f89e7bdab073ef19 Mon Sep 17 00:00:00 2001 From: Mike Griffith Date: Thu, 17 Sep 2015 02:30:58 -0400 Subject: [PATCH] fix(popover): avoid flash of unstyled content Fixes #4427 --- src/tooltip/tooltip.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/tooltip/tooltip.js b/src/tooltip/tooltip.js index 9501f50051..e8370a6521 100644 --- a/src/tooltip/tooltip.js +++ b/src/tooltip/tooltip.js @@ -149,8 +149,10 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position', 'ui.bootstrap.s if (!tooltip || !tooltip.html()) { return; } if (!positionTimeout) { + tooltip.hide(); // Hide to avoid FOUC until $timeout completes positionTimeout = $timeout(function() { // Reset the positioning and box size for correct width and height values. + tooltip.show(); tooltip.css({ top: 0, left: 0, width: 'auto', height: 'auto', visibility: 'hidden' }); var ttBox = $position.position(tooltip);