mirror of
https://github.com/simon987/nyaa.git
synced 2025-12-13 23:29:02 +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:
@@ -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 %}
|
||||
|
||||
Reference in New Issue
Block a user