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

do not append tooltips and popovers to body. This fixes z-index issues: ... #5071

Closed
wants to merge 10 commits into from

Conversation

demike
Copy link

@demike demike commented Sep 11, 2012

@mattlunn
Copy link

Correct me if I'm wrong, but this change will prevent tooltips and popovers working on all elements which have a parent which has css overflow set to hidden, as the tooltip/ popover will render outside the bounds of the element.

Because of this, I don't think this is the correct way to address the issue.

  1. The in option isn't even documented. If it gets documented, more people might use it.
  2. Addition of a parent option (which could be set to document.body, or the elements parent would be more flexible

@demike
Copy link
Author

demike commented Sep 20, 2012

about overflow:hidden parent : as the tooltips are position:absolute this should work. but if the parent has set overflow:hidden and position:relative then the content is cut off.

@mattlunn
Copy link

Ahh, that's for clearing that up demike... My setup was using position relative on a parent, which explains why I was seeing that behaviour!

@demike
Copy link
Author

demike commented Sep 21, 2012

Yeah that's the bad thing about that, but it solves a lot of issues with the current z-index ... setup
An alternative solution would be to create a z-index stack js class (I use a z-index counter for the modals for now and it works pretty well ) and move everything to body, but that brings up problems like:

  • close the modal --> tooltip of modal content is shown even after the dialog was closed
  • do an ajax update on a dom region where a modal was initial (now attached to body) --> duplicate modal (I see this problem in the QCubed php framework)

If you want to see an example of nested dialogs and opening multiple dialogs: just download the source and load
modaltest_z-index_test.html

The absolute positioned modal was added to this pull request accidentally, I pushed it to the wrong branch

@andrewdeandrade
Copy link

Hey @demike,

Thanks for opening this pull-request! Unfortunately, it looks like it fails to pass the criteria neccessary for submitting to bootstrap. The following things are currently failing:

  • should always include a unit test if changing js files

For a full list of issue filing guidelines, please refer to the bootstrap issue filing guidelines.

thanks!

@Ninir
Copy link
Contributor

Ninir commented Sep 27, 2012

@demike Could you please merge the latests 2.1.2-wip branch and rebase yours please? it will be clearer to see what has really changed or not

@mdo mdo closed this Nov 14, 2012
@ihor-sviziev
Copy link

Now i have problems with popup on click to radio button(http://twitter.github.com/bootstrap/javascript.html#buttons - Radio). Last child has not border radius. I think we need add config attribute for change insert popup after element or append to body.

@Yohn
Copy link
Contributor

Yohn commented Dec 6, 2012

@igor-svizev please see my pull request - #5768

@rmeschian
Copy link

Can I suggest an 'appendTo' option be added, which takes a selector and appends the popover to it? This is what the jquery-ui dragging stuff does.

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

Successfully merging this pull request may close these issues.

8 participants