diff --git a/src/js/yunohost/helpers.js b/src/js/yunohost/helpers.js index 30fae9e2..aabf1cae 100644 --- a/src/js/yunohost/helpers.js +++ b/src/js/yunohost/helpers.js @@ -323,8 +323,13 @@ // Modal 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 - $('footer button', box) + $('#modal footer button', box) .click(function(e){ e.preventDefault();