Fix an issue where click events where pilling up if clicking outside the modal window

This commit is contained in:
Alexandre Aubin 2019-10-17 19:04:59 +02:00
parent 9600ef346d
commit c2810a1dcb

View file

@ -323,8 +323,13 @@
// Modal content // Modal content
$('.content', box).html(content); $('.content', box).html(content);
// Clear any remaining click event that could still be there (e.g.
// clicking outside the modal window doesn't equal to clicking
// cancel...
$('#modal footer button').unbind( "click" );
// Handle buttons // Handle buttons
$('footer button', box) $('#modal footer button', box)
.click(function(e){ .click(function(e){
e.preventDefault(); e.preventDefault();