-
-
Notifications
You must be signed in to change notification settings - Fork 79k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tooltip misplacement with "top auto" #14322
Comments
May be it is time to rewrite the tooltip and popover and outsource the complexity of position calculation to a specialized pluglin like PosititionCalculator . OK, that is from myself but it does what you need. Then the bootstrap tooltip and popover only need to apply the calculated position, add the correct class for orientation (to get the arrow to the right side) and manage events. Here is an simple example: http://jsbin.com/sifec/9/edit?html,js,output You would get for free the auto position with flip and stick depending on a viewport / boundary with 9 possible placements instead of the 4 you now supports. |
@tlindig That's definitely out of the scope of this bug report. Please file a separate issue with your proposal and we can discuss your suggestion there. |
(Another library option is http://github.hubspot.com/tether/ ) |
MO, this is not a bug. By specifying “auto top”, you meant to display the tip on the top when possible otherwise bottom. Since you have room for showing tip it appears on top. You can refer this bin where tip is showed on bottom when no room is available. Just my thought. Correct me if i am wrong. |
@Matrixz The bug is, that it do not care the given |
fixed demo http://jsbin.com/gudas/4/
@hnrch02 Thanks for your fix. But there is a new case where the placement is wrong with "auto top": http://jsbin.com/risupocu/11/ |
@gharlan Please file a new issue. |
Fixes twbs#14322. Closes twbs#14581.
http://jsbin.com/risupocu/2/
I would expect that the tooltip is shown on bottom..
The text was updated successfully, but these errors were encountered: