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

tooltip increases the length of the page #4682

Closed
StennikovDmitriy opened this issue Oct 22, 2015 · 2 comments
Closed

tooltip increases the length of the page #4682

StennikovDmitriy opened this issue Oct 22, 2015 · 2 comments

Comments

@StennikovDmitriy
Copy link

I have found that when the tooltip disappears for a moment the page length is increased by the tooltip element height.
Tooltip configured with appendToBody: true

$uibTooltipProvider.options({
            placement: 'top',
            animation: false,
            popupDelay: 0,
            appendToBody: true
        });

Markup is trivial

<a href="#" class="btn blue" uib-tooltip="Edit">
    <i class="fa fa-edit"></i>
</a>

Tooltip element at this moment (when it disappears) looks like:
screenshot_12

Normally, the the element has a style: style="visibility: visible; display: block; top: 513px; left: 1688.25px;"
visibility:hidden in fact, it does not hide the the element and it appears at the end of the page. The page length increases, for a moment appears a scroll bar.

I think should be display:none instead of visibility:hidden or just don't remove top & left position.

@StennikovDmitriy
Copy link
Author

ui-bootstrap: 0.14.2
Bootstrap: 3.3.4
angular: 1.3.16

The obvious hotfix:

.tooltip { top: 0; }

@RobJacobs
Copy link
Contributor

The tooltip service is used for both popovers and tooltips which have different css implementations. Using display: none causes issues with measuring the popover height and width for top and left calculations. Recent PRs #4621 and #4623 attempt to put this issue to rest once and for all.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants