Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

feat(tooltipProvider): added appendToBody option for $tooltip #254

Merged
merged 1 commit into from
Mar 22, 2013

Conversation

joshdmiller
Copy link
Contributor

Okay, in re #139 I decided to just create a completely independent option called appendToBody for now. When true, the tooltips will be appended to the body. I do not think this is the best long-term solution, but until someone comes up with something brilliant for containers, this will do.

I intentionally did not update the docs. I think before we unleash the $tooltipProvider on the public, we should add a few more options to it, some proper defaults, and a few more detailed tests.

I also did not update the demo as that is not feasible in this case (needs a config block). But all the tests pass and I created a working Plunker.

This doesn't close #139 as that's still an issue, but it provides a good stopgap.

What do y'all think?

@pkozlowski-opensource
Copy link
Member

@joshdmiller this looks good to me.

Only one question: if I understand correctly now this is a global option, right? Is there any value to support this on an attribute level as well?

@joshdmiller
Copy link
Contributor Author

@pkozlowski-opensource I thought about that. I don't see a strong reason to include it. Also I'm not a big fan of that kind of implementation detail going into the view. Meh.

But if y'all want to include it, we can. Thoughts?

@pkozlowski-opensource
Copy link
Member

@joshdmiller I don't have strong opinion here. It was more a question than a suggestion. Maybe let's merge it as-is and see how things evolve?

@joshdmiller
Copy link
Contributor Author

I had to resolve some merge conflicts from the last PR as well as refactor the specs a little bit, so I'm putting this on a separate branch to ensure all is still peachy: https://github.com/angular-ui/bootstrap/tree/merge254.

@joshdmiller joshdmiller merged commit e5d593b into angular-ui:master Mar 22, 2013
@joshdmiller
Copy link
Contributor Author

Landed as 1ee467f.

@anton-dev-ua
Copy link
Contributor

This solves problem with relative/absolut/fixed positioned parent (e.g. tooltip in a dialog). But now there is another problem with a dilog. "modal" has higher z-index then "tooltip" in bootstrap css.

.tooltip {
  position: absolute;
  z-index: 1030;
  ...
}
...
.modal {
  position: fixed;
  top: 10%;
  left: 50%;
  z-index: 1050;
  ...
}

@joshdmiller
Copy link
Contributor Author

@anton-dev-ua Correct. The tooltip has to be inside the modal to get the z-index to work. That's how Twitter defined their styles.

@stefano-caporale-wk
Copy link

stefano-caporale-wk commented Oct 7, 2016

What if I need to append the popover to a custom container that is not the body?

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

Successfully merging this pull request may close these issues.

Consider add container option, that solves some bootstrap issues
4 participants