Skip to content

Commit

Permalink
Fix dialog cancel button error
Browse files Browse the repository at this point in the history
  • Loading branch information
Paxa committed May 1, 2017
1 parent 3884487 commit bebb16b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/alertify.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@
if ((keyCode === keys.SPACE && !hasInput) || (hasInput && keyCode === keys.ENTER)) ok(event);
if (keyCode === keys.ESC && hasCancel) cancel(event);
if (keyCode === keys.ESC) {
var cancel = document.querySelector('.alertify-dialog button.cancel');
if (cancel) cancel.click();
var cancelBtn = document.querySelector('.alertify-dialog button.cancel');
if (cancelBtn) cancelBtn.click();
}
};

Expand Down

0 comments on commit bebb16b

Please sign in to comment.