mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 01:58:12 +08:00
A11Y: Trap focus on auth security modal (#18573)
This commit is contained in:
parent
c81763dcd8
commit
78044ad2aa
|
@ -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();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user