#33504 closed Bug (invalid)
Admin autocomplete search input does not get focused on click
Reported by: | Márton Salomváry | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | 4.0 |
Severity: | Normal | Keywords: | admin autocomplete select2 focus |
Cc: | Carlton Gibson | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | yes |
Description
When using autocomplete_fields
I expect the autocomplete dropdown's search input to be focused when the autocomplete is open. This used to be the case before 4.0 but it is no longer the case in 4.x.
Steps to reproduce:
- Clone this repo: https://github.com/salomvary/django-select2-bug
pip3 install django==4
python3 ./manage.py runserver
- Open http://127.0.0.1:8000/admin/myappp/thing/add/
- Sign in with username: admin, password: admin
- Click on the select next to "Other things:"
Expected: search input is focused.
Actual: search input is not focused.
After pip3 install django==3
and restarting the server, the select can be tested with the expected behavior.
Attachments (2)
Change History (7)
by , 3 years ago
Attachment: | Django 3.png added |
---|
by , 3 years ago
Attachment: | Django 4.png added |
---|
follow-up: 2 comment:1 by , 3 years ago
Cc: | added |
---|---|
Resolution: | → invalid |
Status: | new → closed |
comment:2 by , 3 years ago
Replying to Mariusz Felisiak:
This is a regression introduce in the update of admin's jQuery to 3.6.0, see ef4ef3b8f5e253f009d27952a4e75e008c9d6e5f. I don't think there is much we can do, it's an issue between two vendored libraries
Select2
andjQuery
. You can try to report it on their issue tracker.
Thanks for the quick response, will try to figure out what to report and where.
comment:3 by , 3 years ago
For reference this is the bug report in Select2 https://github.com/select2/select2/issues/5993
follow-up: 5 comment:4 by , 19 months ago
This is now fixed in the new release of jQuery 3.7.
https://github.com/select2/select2/issues/5993#issuecomment-1544538515
comment:5 by , 19 months ago
Replying to Hielke Walinga:
This is now fixed in the new release of jQuery 3.7.
https://github.com/select2/select2/issues/5993#issuecomment-1544538515
Great, we're going to bump jQuery to 3.7.X in Django 5.0.
This is a regression introduce in the update of admin's jQuery to 3.6.0, see ef4ef3b8f5e253f009d27952a4e75e008c9d6e5f. I don't think there is much we can do, it's an issue between two vendored libraries
Select2
andjQuery
. You can try to report it on their issue tracker.