1
0
Fork 0
mirror of https://gitlab.com/SIGBUS/nyaa.git synced 2024-12-22 14:10:00 +00:00

Focus report reason text field when reporting

A small convenience change which by sets the focus to the newly
opened modal dialog's text field if the report button is hit.

This way, people can type away their gripes with the torrent without
having to click into the text field first.
This commit is contained in:
Nicolas F 2017-05-30 19:31:28 +02:00
parent 051f3f38d2
commit 07d45b6223

View file

@ -216,4 +216,11 @@
target.innerHTML = writer.render(parsed);
</script>
{% endblock %}
<script>
// Focus the report text field once the modal is opened.
$('#reportModal').on('shown.bs.modal', function () {
$('#reason').focus();
})
</script>
{% endblock %}