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

Close an open popover-show on click in a dropdown #17936

Closed
debby1 opened this issue Oct 15, 2015 · 1 comment
Closed

Close an open popover-show on click in a dropdown #17936

debby1 opened this issue Oct 15, 2015 · 1 comment
Labels

Comments

@debby1
Copy link

debby1 commented Oct 15, 2015

Hi,

I'm working on notice (a popover) of Private Messages on my forum with Bootstrap 3.3.5.

Private Message link is in a link in li dropdown, in the dropdown there is the list of PM unread, with title, hour etc of the PM.

If user receives a new Private Message, before there is a popover "You have received Xz new private messages, click to read" and then there is li dropdown with list of Private Messages.

Popover is always show when the page is loaded, like an alert for the user.

And when user clicks on Private Message, popover is closed and user can read private messages.

The problem is that popover is always open, also when I read private messages, so it's impossible to read unread PMs.

My code is:

    <li class="dropdown popover-show" data-toggle="popover" data-placement="bottom" data-container="body" data-content="You have 5 new Private Messages! But this notice is always open, so you can't read unread PM :( ">

    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
    <span>Private Messages</span>
    <span class="badge">5</span> <span class="caret"></span></a>

    <ul class="dropdown-menu  dropdown-menu-sw">
    <li><a href="#"><strong>Title PM etc - Unread</strong></a></li>
    </ul>

    </li>



    <script>
    $(function () {
    $('.popover-show').popover('toggle');
    });
    </script>

I would like only that on my first click on "Private Messages" (the popover) it is close and I can read private messages.

Bootply full example: http://www.bootply.com/zWQXzrS9zo

And other odd thing: I refresh the page, popover is show, I click to open dropdown of Private Messages (popover is always show), then (with dropdown Private Messages still open!) I click also on Other links.

In this way I'll have finally dropdown Private Messages toggle with popover. If I open/close Private Messages dropdown popover will be close/open. Is it a bug?

Thank you,
sorry for my English

@cvrebert
Copy link
Collaborator

Probable duplicate of #16732.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants