-
-
Notifications
You must be signed in to change notification settings - Fork 78.8k
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
Popover with no animation doesn't hide (after toggle) #10568
Comments
The function complete() {
if (that.hoverState != 'in') $tip.detach()
} Which checks the Here are the changes I made: http://pastebin.com/Jq6ebg05 When I'll find the time, I will test it more thoroughly and make a PR out if this (if nobody else already beat me to it). I hope this fixes your problem for now. |
@mauvm Thanks very much, your fix appears to solve my issue that I was having. |
Since bootstrap has so nicely evented all of their javascript, it's easy to do this with out hacking core. $('body').on('hidden.bs.popover', function() {
$('.popover:not(.in)').hide().detach();
}); That being said, still a bug. |
This issue also is present by default in IE8, though the aforementioned patch fixes it brilliantly thanks @mauvm ! |
Pull Request #11463 |
@patrickwiseman The PR you proposed does not integrate the full fix and will now always detach the tip. Would you mind adding all rules that contain "hoverActivated" of http://pastebin.com/Jq6ebg05 to tooltip.js? Oh and thanks for making a PR. :) |
Good catch @mauvm I was like half asleep last night, it's updated now. |
If you use
$().popover
with no animation and show the popover with$().popover('toggle')
(i.e.trigger: 'manual'
), then it doesn't hide after$().popover('hide')
is called.Demo: http://jsfiddle.net/sJtrg/
The problem seems to be that inside the
Tooltip.prototype.toggle
function,enter
andleave
are called instead ofshow
andhide
:This was changed as part #7163 (9257bdc).
Inside
enter
, the following property is set:and inside
hide
, the popover is only removed if this property is not'in'
:The same problem exists with animation of course, but since element was faded out, it's not visible (even though it doesn't get detached).
I would have changed the calls from
leave
andenter
tohide
andshow
again, but I didn't go through the other issue completely, so I don't know if that would reintroduce the other bug. There might be a different way to solve this problem.The text was updated successfully, but these errors were encountered: