diff --git a/django/contrib/admin/templates/admin/login.html b/django/contrib/admin/templates/admin/login.html
index dbaa119..c39c158 100644
a
|
b
|
|
30 | 30 | <form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %} |
31 | 31 | <div class="form-row"> |
32 | 32 | {% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %} |
33 | | <label for="id_username" class="required">{% trans 'Username:' %}</label> {{ form.username }} |
| 33 | <label for="id_username" class="required" autofocus>{% trans 'Username:' %}</label> {{ form.username }} |
34 | 34 | </div> |
35 | 35 | <div class="form-row"> |
36 | 36 | {% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %} |
… |
… |
|
44 | 44 | </form> |
45 | 45 | |
46 | 46 | <script type="text/javascript"> |
47 | | document.getElementById('id_username').focus() |
| 47 | if (!('autofocus' in document.createElement('input'))) { |
| 48 | document.getElementById('id_username').focus(); |
| 49 | } |
48 | 50 | </script> |
49 | 51 | </div> |
50 | 52 | {% endblock %} |