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

onUnblock not called on nth (< 1) use #139

Open
ericprud opened this issue Jun 19, 2017 · 0 comments
Open

onUnblock not called on nth (< 1) use #139

ericprud opened this issue Jun 19, 2017 · 0 comments

Comments

@ericprud
Copy link

In this HTML/JS, clicking the #go-modal

and then dismissing the modal dialog will give a popup for the first cycle but not for subsequent cycles.

<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <script src="https://www.w3.org/scripts/jquery/2.1.4/jquery.min.js"></script>
    <script src="http://malsup.github.io/jquery.blockUI.js" type="text/javascript"></script>
  </head>

  <body>
    <p id="go-modal">click me</p>
    <div id="modelElt" style="display:none;">
      <p><button>OK</button></p>
    </div>
    <script>
$(document).ready(() => {
  $("#go-modal").click(evt => {
    $.blockUI({
      message: $("#modelElt"), css: {
        top: "0",
        left: "0"
      },
      onUnblock: function() { // -- unreliable
        alert("asdf");
      } 
    });
    $("#modelElt").attr("title","Click to dismiss").click(dismissModal);
  });

  function dismissModal (evt) {
    $.unblockUI();
    return true;
  }
});
    </script>
  </body>
</html>
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