Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

fix(popover): avoid flash of unstyled content #4428

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/tooltip/tooltip.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

positionTooltip is called frequently in some cases for an already open tooltip, so this could cause flickering.

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);
Expand Down