Skip to content

Commit

Permalink
focus on element instead of jumping back up page
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottDormand96 committed Nov 29, 2023
1 parent 9f89549 commit b4779e5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@
document.getElementById("change-email").addEventListener("click", function () {
document.getElementById("email-ro").style.display = "none"
document.getElementById("email-rw").style.display = "block"
document.getElementById("email").focus()
})
})()</script>
<script nonce={{nonce}}>(function () {
Expand All @@ -153,6 +154,7 @@
document.getElementById("change-text").addEventListener("click", function () {
document.getElementById("text-ro").style.display = "none"
document.getElementById("text-rw").style.display = "block"
document.getElementById("text").focus()
})
})()</script>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@
document.getElementById("change").addEventListener("click", function () {
document.getElementById("ref-ro").style.display = "none"
document.getElementById("ref-rw").style.display = "block"
document.getElementById("ref").focus()
})
})()</script>
{% endblock %}

0 comments on commit b4779e5

Please sign in to comment.