diff --git a/public/src/client/account/edit.js b/public/src/client/account/edit.js index c3de1ec9bf..aba7058b94 100644 --- a/public/src/client/account/edit.js +++ b/public/src/client/account/edit.js @@ -153,7 +153,7 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'], function handleAccountDelete() { $('#deleteAccountBtn').on('click', function() { translator.translate('[[user:delete_account_confirm]]', function(translated) { - bootbox.confirm(translated + '

', function(confirm) { + var modal = bootbox.confirm(translated + '

', function(confirm) { if (!confirm) { return; } @@ -169,6 +169,10 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'], }); } }); + + modal.on('shown.bs.modal', function() { + modal.find('input').focus(); + }); }); return false; });