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

popover not destroyed correctly while showing #10335

Closed
patricklx opened this issue Aug 31, 2013 · 12 comments
Closed

popover not destroyed correctly while showing #10335

patricklx opened this issue Aug 31, 2013 · 12 comments

Comments

@patricklx
Copy link

The popover will not destroy properly while showing.

Here is a fiddle to demonstrate it: http://jsfiddle.net/vBUFu/20/ [edited].
Hover over the button and wait 5sec to see what i mean.
(I changed the opacity of the fade class so that the popover stays visible.)

The problem is that even with opacity 0, one cannot click on elements behind it!

It works when its manually shown, but not with events like 'hover' or 'click'.

@cvrebert
Copy link
Collaborator

Your fiddle is using RC 2 CSS. Please update it to use the v3.0.0 final release CSS and then re-test.

@cvrebert
Copy link
Collaborator

Similar to #10260.

@patricklx
Copy link
Author

done. But still the same problem.
http://jsfiddle.net/vBUFu/20/

@cvrebert
Copy link
Collaborator

X-Ref: #10740

@saimeunt
Copy link

saimeunt commented Oct 2, 2013

Popover hide method seems to mess up with the z index value of the popover.

I need to close all other popovers when clicking on a new one, I'm achieving this behaviour simply by triggering popovers manually : in the click function, I call toggle on the current popover then call the hide method of every popovers except the current one.
Hiding a popover when it's shown with toggle works fine, the problem is when I try to hide another popover currently shown with the hide method.

See my jsfiddle :
http://jsfiddle.net/saimeunt/3MUzq/

  1. Click on Button 1.
  2. Click on Button 4.
  3. Click again on Button 4.
  4. Now you can't click on Button 2 anymore.

As previously hinted, using .popover("hide") on a shown popover doesn't hide it properly, his opacity is set to zero however it's still there above other stuff so my guess is that z-index is not reset accordingly.

@u007
Copy link

u007 commented Nov 8, 2013

hi,
should the hidden popup having display: none?
i notice the display: block is still on even thou the opacity: 0

@ValentinH
Copy link

I have the same problem. When we use the button to hide, it's OK, but when we use the API by calling 'hide', the element only has a 0 opacity so it messes up the other elements on the page.

@DixonDs
Copy link

DixonDs commented Dec 11, 2013

I have the same issue. I believe that a popover should be removed from DOM on hide, not just hidden. But at least it should be display:none instead of display:block

@ido-ran
Copy link

ido-ran commented Dec 12, 2013

I have similar project in which I create popover dynamically and when I call the destroy method the popover DOM elements remain and are not removed.

@j8
Copy link

j8 commented Dec 16, 2013

Temporary solution (works in my case, i.e AngularJS directive with multiple position top popovers):

after: popover.hide(), place:

jQuery('.popover.fade.top').css( "display", "none", "important");

@cvrebert
Copy link
Collaborator

Closing as duplicate of #10260.

@dud3
Copy link

dud3 commented Oct 4, 2014

@j8 +1 this solved my problem.

@twbs twbs locked and limited conversation to collaborators Oct 4, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

9 participants