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

fix(tooltip): Tooltip causing scroll bars to quickly show #4550

Closed
wants to merge 2 commits into from
Closed

fix(tooltip): Tooltip causing scroll bars to quickly show #4550

wants to merge 2 commits into from

Conversation

cassilup
Copy link

@cassilup cassilup commented Oct 8, 2015

When the element that has a tooltip attached is hovered upon, the tooltip is created and positioned accordingly. However, there is a slight flicker between the time that the tooltip element is added to the DOM and the moment when it is positioned where it needs to be displayed. This also causes scrollbars to appear/flicker on the browser window in some cases. The fix consists of hiding the tooltip by default (display: none) and then displaying it once it is in place (display: block).

Closes #4458

When the element that has a tooltip attached is hovered upon, the tooltip is created and positioned accordingly. However, there is a slight flicker between the time that the tooltip element is added to the DOM and the moment when it is positioned where it needs to be displayed. This also causes scrollbars to appear/flicker on the browser window in some cases. The fix consists of hiding the tooltip by default (display: none) and then displaying it once it is in place (display: block).

Closes #4458
When the element that has a tooltip attached is hovered upon, the tooltip is created and positioned accordingly. However, there is a slight flicker between the time that the tooltip element is added to the DOM and the moment when it is positioned where it needs to be displayed. This also causes scrollbars to appear/flicker on the browser window in some cases. The fix consists of hiding the tooltip by default (display: none) and then displaying it once it is in place (display: block).

Code cleanup.
@wesleycho
Copy link
Contributor

So the visibility: hidden hack is so that the correct positioning can be calculated on the tooltip for positioning correctly - there are some situations where the position of the tooltip is calculated incorrectly when it is not present in the DOM with certain positional values from the render.

@RobJacobs
Copy link
Contributor

The original issue #4195 where the visibility approach was added.

I did some further testing and using the display approach causes inconsistent results when positioning the tooltip, thus the reason for the original change noted above.

@RobJacobs RobJacobs closed this in 6c82b2b Oct 14, 2015
aroop pushed a commit to aroop/bootstrap that referenced this pull request Oct 16, 2015
When the tooltip is rendered for positioning scroll bars
may breifly appear depending on where the linked element
is positioned. This change adds a negative top and left
style to push the tooltip element out of view while it
is being measured and positioned.

Closes angular-ui#4550
Closes angular-ui#4623
Fixes angular-ui#4458
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Tooltip causing scroll bars to quickly show
3 participants