diff --git a/js/functions.js b/js/functions.js index 6ff398875f..2a825dcb76 100644 --- a/js/functions.js +++ b/js/functions.js @@ -3120,12 +3120,6 @@ function PMA_checkPassword($the_form) return true; } -/** - * Unbind all event handlers before tearing down a page - */ -AJAX.registerTeardown('functions.js', function () { - $(document).off('click', '#change_password_anchor.ajax'); -}); /** * Attach Ajax event handlers for 'Change Password' on index.php */ @@ -3190,9 +3184,15 @@ AJAX.registerOnload('functions.js', function () { $('#text_pma_pw').prop('required', true); }); + /** + * Unbind all event handlers before tearing down a page + */ + $(document).off('click', '#change_password_anchor.ajax'); + /** * Attach Ajax event handler on the change password anchor */ + $(document).on('click', '#change_password_anchor.ajax', function (event) { event.preventDefault();