-
-
Notifications
You must be signed in to change notification settings - Fork 78.9k
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
Rewrite Tooltip and Popover #14327
Comments
Another library option might be Tether (http://github.hubspot.com/tether/). |
As @cvrebert said:
Yes that library handle auto placement for you too. But it does some more stuff:
For my project, it was to much. |
I agree that this particular part of the code is rather tricky but I'm not sure how I feel about adding another third-party dependency. Anyways, it's @fat's call. |
yeah… i didn't write any of the positioning stuff for the tooltip because i was kind of it should probably be revisited in v4 – not sure whether we should rewrite it ourselves or use a third party lib. +/- with both |
Noted for v4. |
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.
That could solve issues like this:
#14322, #14323, #14197, #13934, #13897 ...
The text was updated successfully, but these errors were encountered: