fix(tooltip): reposition for placement top#5959
fix(tooltip): reposition for placement top#5959wesleycho wants to merge 1 commit intoangular-ui:masterfrom
Conversation
|
Nice! LGTM |
- Reposition the tooltip when the placement option contains top in order to account for resizing of tooltip from right side
7782804 to
47873cd
Compare
|
Updated the top class check - take another look again when you get the chance. I want to abstract this logic away into a nice helper method on $uibposition I think, even if it is small. What do you think about that? |
|
I'm all for abstracting logic for re-use. I made a couple of tweaks that I'd like to run by you, see this plunk Biggest changes are: Moved the height change check to the positionTimeout resolve rather than create another timeout. When adjusting the css top value, it should be the difference of the initialHeight and currentHeight as the initialHeight of the tooltip is already factored into the css top value. |
|
Interesting, I like this except for the leaking of data. What are your thoughts on it? Maybe we should merge this and you can file a PR on top of it? |
|
Going to merge this, we can iterate from here. |
I did some research and encountered this in Bootstrap's tooltip service: https://github.com/twbs/bootstrap/blob/master/js/tooltip.js#L282-L284
I replicated this logic, and it can be seen in action here
This correctly fixes #5914
cc @RobJacobs