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.
--
Ticket URL: <https://code.djangoproject.com/ticket/33504>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* Attachment "Django 3.png" added.
* Attachment "Django 4.png" added.
* cc: Carlton Gibson (added)
* status: new => closed
* resolution: => invalid
Comment:
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` and
`jQuery`. You can try to report it on their issue tracker.
--
Ticket URL: <https://code.djangoproject.com/ticket/33504#comment:1>
Comment (by Márton Salomváry):
Replying to [comment:1 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` and
`jQuery`. 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/33504#comment:2>
Comment (by Márton Salomváry):
For reference this is the bug report in Select2
https://github.com/select2/select2/issues/5993
--
Ticket URL: <https://code.djangoproject.com/ticket/33504#comment:3>
Comment (by Hielke Walinga):
This is now fixed in the new release of jQuery 3.7.
https://github.com/select2/select2/issues/5993#issuecomment-1544538515
--
Ticket URL: <https://code.djangoproject.com/ticket/33504#comment:4>
Comment (by Mariusz Felisiak):
Replying to [comment:4 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.
--
Ticket URL: <https://code.djangoproject.com/ticket/33504#comment:5>