Support auto-focusing in openPopup

This commit is contained in:
somebody
2022-10-30 21:32:47 -05:00
parent c750163d17
commit 53b1695627

View File

@@ -4922,6 +4922,12 @@ function openPopup(id) {
const popup = $el(`#${id}`);
popup.classList.remove("hidden");
// Sometimes we want to instantly focus on certain elements when a menu opens.
for (const noticeMee of popup.getElementsByClassName("focus-on-me")) {
noticeMee.focus();
break;
}
}
function closePopups() {