diff --git a/app/assets/javascripts/discourse/app/controllers/auth-token.js b/app/assets/javascripts/discourse/app/controllers/auth-token.js index 52ddce5f4de..3e089cbaf45 100644 --- a/app/assets/javascripts/discourse/app/controllers/auth-token.js +++ b/app/assets/javascripts/discourse/app/controllers/auth-token.js @@ -14,6 +14,8 @@ export default Controller.extend(ModalFunctionality, { ).then((posts) => { if (posts.length > 0) { this.set("latest_post", posts[0]); + // slightly hacky, but default d-modal focus gets reset + document.querySelector(".d-modal .modal-close")?.focus(); } }); },