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

manually triggering breaks closing on global click #50

Open
borisreitman opened this issue Jun 11, 2015 · 0 comments
Open

manually triggering breaks closing on global click #50

borisreitman opened this issue Jun 11, 2015 · 0 comments

Comments

@borisreitman
Copy link

Here's a sample.

    <script>
      function test_close(){
        $('#mybutton1').clickover('hide');
      } 
      function test_show(){
        $('#mybutton1').data().clickover.show();
        //$('#mybutton1').clickover('show');
      }
      $(function() {
        $('#mybutton1').clickover();
      })   
    </script>
    <button onclick="test_close()" onclick="test_close();">hide</button>
    <button onclick="test_show()" onclick="test_close();">show</button>    
    <a href="#" id="mybutton1" class="btn btn-secondary" data-content="Hello World">dummy</a>

Click the button "show", the popup appears correctly. However, now click outside it, it should close. But doesn't. This doesn't happen if the button "dummy" is clicked -- everything works correctly. Note: after every experiment with this page, refresh it to reset the state.

The reason for this bug is that clickery() function is never called when manually showing.

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

No branches or pull requests

1 participant