Closed tiblu closed 7 years ago
HI @tiblu you can use the option tooltip-append-to-body="true"
see https://github.com/720kb/angular-tooltips#doc.
Wrapping the tooltip item is usually or at least in the majority of the cases: much more stable.
Specially if you can use css translations inside the tooltip wrapper to position the tip.
Having tooltips on body level also gets more long on the js side, positioning through css is way faster, stable and shorter (5/6 lines of css).
Of course this code is not perfect and any help is appreciated :)
@45kb The tooltip-append-to-body
still keeps the target element wrapped which still causes issues.
But thank you for your quick insight and all the work on this project!
@tiblu you're welcome ;)
Question
Is there a specific reason why the implementation wraps the target element into custom HTML elements (
<tooltip><tip-cont>...
) instead of adding the custom elements to the<body>
when the tip is to be displayed?Code:
<a href="#" tooltips tooltip-template="Link tooltip" tooltip-smart="true">Link</a>
Result:
Problem
Wrapping like this changes DOM which may cause layout issues when CSS child selectors are used and also because of default for each element is
display: block
.Alternative
Add all the tooltip DOM elements to
<body>
and not wrap original element.