bootstrapx-clickover icon indicating copy to clipboard operation
bootstrapx-clickover copied to clipboard

manually triggering breaks closing on global click

Open borisreitman opened this issue 9 years ago • 0 comments

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.

borisreitman avatar Jun 11 '15 17:06 borisreitman