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

Commit f7cb8bc

Browse files
DiHuang1986wesleycho
authored andcommitted
fix(tooltip): set visibility: hidden to avoid flicker
- Set `visibility: hidden` and then to `visible` to avoid flicker from positional movement Closes #4342
1 parent 5482db2 commit f7cb8bc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/tooltip/tooltip.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,8 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position'])
146146

147147
ttCss.width = ttBox.width + 'px';
148148
ttCss.height = ttBox.height + 'px';
149+
150+
ttCss.visibility = 'visible';
149151

150152
// Now set the calculated positioning and size.
151153
tooltip.css(ttCss);
@@ -225,7 +227,7 @@ angular.module('ui.bootstrap.tooltip', ['ui.bootstrap.position'])
225227
ttScope.$apply(); // digest required as $apply is not called
226228
}
227229

228-
tooltip.css({ display: 'block' });
230+
tooltip.css({ display: 'block', visibility: 'hidden' });
229231

230232
positionTooltip();
231233
}

0 commit comments

Comments
 (0)