-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Tooltip remains when location is changed while tooltip is visible #345
Comments
Similar to #335 We should be watching $location change events or use a similar technique. Should be an easy fix. |
Sounds good. Haven't tested yet, but this bug might be common to all overlay elements…? On Apr 22, 2013, at 6:39 PM, Pawel Kozlowski [email protected] wrote:
|
@choffmeister yes, this would be a common problem for tooltips, popovers and the like. After thinking about it some more I'm a bit puzzled why those elements stay in the DOM, Are you attaching tooltips to the |
@pkozlowski-opensource when I read it first, I thought that he has the tooltip bound not to the view being refreshed/replaced and instead in a parent element with a different controller. Because changing the view itself should always result in a re-render of the DOM, or? Something I was fighting last week... :-) |
After work this afternoon I will submit the concrete HTML markup. |
@jhiemer I must say that at present I don't know what is going on, didn't debug this. I suspect that the tooltip is attached to the @choffmeister yes, a reproduce scenario would be awesome, need to make sure that we are fixing the right thing... |
Yes I bound the tooltip to the body (or more precisely, a special DIV container that is meant to contain the tooltip overlays). I do this, because the tooltip shall show when the mouse is over a SVG element. On Apr 23, 2013, at 8:59 AM, Johannes Hiemer [email protected] wrote:
|
@choffmeister - What do you mean you're attaching tooltips to a special DIV? The current version does not have that capability. |
@choffmeister @joshdmiller I kind of managed to reproduce it in this plunk: http://plnkr.co/edit/KJ0KZeOA9RK3c883NPz0?p=preview It uses the latest version from master as we need to be able to append tooltips directly to body. In order to reproduce click on the "second" link, route changes, activate tooltip and press back to change the route. You will notice that the tooltip remains displayed. This is very minor for tooltips but might be more problematic for popovers. We should fix it as it is a real problem and should be easy to tackle. Still, I'm not sure if this is what @choffmeister reported... Anyway, we can fix the issue from this plunk at least if we don't hear from the person. |
@pkozlowski-opensource Yeah, I see that now. It should be this simple: scope.$on('$locationChangeSuccess', function closeOnLocationChange () {
if ( scope.tt_isOpen ) {
hide();
}
}); |
@joshdmiller I'm starting to cut a new But I think that this is one is not very urgent as this is a corner case really. So I will just open a PR for this one so you can review and we can do some more testing. |
When a tooltip is visible at the moment and one changes the current location (for example by pressing backspace) then the tooltip remains an screen. It does not disappear until full page reload.
The text was updated successfully, but these errors were encountered: