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:
parent
051f3f38d2
commit
07d45b6223
|
@ -216,4 +216,11 @@
|
|||
target.innerHTML = writer.render(parsed);
|
||||
</script>
|
||||
|
||||
<script>
|
||||
// Focus the report text field once the modal is opened.
|
||||
$('#reportModal').on('shown.bs.modal', function () {
|
||||
$('#reason').focus();
|
||||
})
|
||||
</script>
|
||||
|
||||
{% endblock %}
|
Loading…
Reference in a new issue