Popover has unexpected dynamic behavior when using `selector` delegation #5338

Closed
dannyroberts opened this Issue Sep 28, 2012 · 4 comments

Comments

Projects
None yet
4 participants

There are two issues outlined in the jsfiddle below.
http://jsfiddle.net/AwkWS/2/

One is that if you delegate two different popovers to $('body') using the selector option, only the first one will be taken into account.

The other is that if you click on an item while the popover is open, and clicking on it makes that item no longer match the selector, the popover gets stuck open.

The general context is that I have a widget that has two states, like starred and unstarred, and I'd like to use popovers to give the user directions as to what will happen if they click on it. When they click, the class or a data attribute on the widget changes, and I'd like the popover to change accordingly.

Owner

mdo commented Oct 1, 2012

Another link to the selector docs issue: #4215.

Hey Mark, I actually read that issue before posting mine. I think that this issue is separate in that the selector delegation functionality only works for newly created nodes that fit the selector; it does not work well for nodes that used to fit the selector but then changed. (Or something along those lines; I might be misidentifying the cause.)

Owner

fat commented Oct 18, 2012

you can only have one instance of a class on an element in bootstrap. that is current limitation of the design. If you want multiple selectors: .first .selector, .second .selector

@fat fat closed this Oct 18, 2012

Contributor

krnlde commented Jan 2, 2016

I want to bump this topic again for v4, since it was "just" a design issue, but is yet pretty annoying. New issue/request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment