Skip to content
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

Tooltips in Tabs in Modal don't position correctly #13322

Closed
jub3i opened this issue Apr 11, 2014 · 8 comments
Closed

Tooltips in Tabs in Modal don't position correctly #13322

jub3i opened this issue Apr 11, 2014 · 8 comments

Comments

@jub3i
Copy link

jub3i commented Apr 11, 2014

My first issue submission. I searched and did not find anything related to this issue here or on google, also checked the docs and nothing.

The fiddle displays the issue, http://jsfiddle.net/mCy6V/
I only tested in FF28

To reproduce in the fiddle:

  1. open the modal
  2. click the "add tooltips" button
  3. observe the current tabs tooltip is positioned correctly.
  4. observe that in the remaining tabs, the tooltips are positioned to the upper left of the tab and NOT over the span element

I think the modal in the tooltip/modal/tab combination is not the issue, its more the tooltip/tab, but that is a fiddle for another day...

@jub3i jub3i changed the title Tooltips in Modal in Tabs don't position correctly Bug: Tooltips in Modal in Tabs don't position correctly Apr 11, 2014
@cvrebert cvrebert changed the title Bug: Tooltips in Modal in Tabs don't position correctly Tooltips in Tabs in Modal don't position correctly Apr 11, 2014
@cvrebert
Copy link
Collaborator

Don't forcibly show tooltips on hidden elements?
E.g. If you use non-manual triggering and remove the manual show calls, the tooltips in your example work fine.
I suppose this could stand to be noted in the docs. Does that sound satisfactory?

@cvrebert cvrebert added this to the v3.2.0 milestone Apr 11, 2014
@jub3i
Copy link
Author

jub3i commented Apr 11, 2014

Ok so I'm using tooltips like below:

screenshot from 2014-04-11 13 39 56

Above depicts a form split over 3 tabs, and in a modal. When there is a validation error I manually trigger the tooltips. After reading the docs a little more it seems popovers may be better suited to this problem, however, following this fiddle (http://jsfiddle.net/mCy6V/3/), they also behave incorrectly like the tooltips not positioning correctly.

I'm quite new to javascript in general so if my understanding is wrong I apologize in advance: I see what your saying about applying things to hidden elements and how that is likely the problem, however it seems like my use case is fairly legitimate for those popovers/tooltips and they do not work just for the fact that are "hidden" in a tab... hence it is a bug. That's my reasoning anyway, look forward to your response.

@fat
Copy link
Member

fat commented Apr 16, 2014

if you're using tips manually like that, you'll have to tell them to reposition themselves when you change the dom on them like that manually.

if you need help figuring that out, please refer to the bootstrap mailing list. cheer!

@fat fat closed this as completed Apr 16, 2014
@fat
Copy link
Member

fat commented Apr 16, 2014

hint: basic idea is on tab change, call tooltip hide/show, etc.

@cvrebert cvrebert modified the milestone: v3.2.0 Apr 16, 2014
@cvrebert
Copy link
Collaborator

@fat There is no mailing list anymore. We're referring folks to StackOverflow nowadays.

@fat
Copy link
Member

fat commented Apr 20, 2014

@cvrebert oh cool, thanks

@jub3i
Copy link
Author

jub3i commented May 12, 2014

thanks for the help @cvrebert and @fat , I modified the fiddle for a proof of concept, in case any one else runs into this problem: http://jsfiddle.net/mCy6V/5/

@Enalmada
Copy link

Enalmada commented Apr 5, 2018

For anyone finding this ticket in google after hitting this issue, consider the using the tooltip('update') in a shown.bs.tab event:

$(document).on('shown.bs.tab ', '.something', function (e) {
    $('[data-toggle="manual-tooltip"]').tooltip('update');
});

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

No branches or pull requests

4 participants