django/tests/admin_widgets
Blayze 90429625a8
Some checks are pending
Docs / docs (push) Waiting to run
Docs / blacken-docs (push) Waiting to run
Linters / flake8 (push) Waiting to run
Linters / isort (push) Waiting to run
Linters / black (push) Waiting to run
Tests / Windows, SQLite, Python 3.13 (push) Waiting to run
Tests / JavaScript tests (push) Waiting to run
Fixed #36423 -- Prevented filter_horizontal buttons from intercepting form submission.
In the admin's filter_horizontal widget, optional action buttons like
"Choose all", "Remove all", etc. were changed from `<a>` to `<button>`
elements in #34619, but without specifying `type="button"`. As a result,
when pressing Enter while focused on a form input, these buttons could
be triggered and intercept form submission.

Explicitly set `type="button"` on these control buttons to prevent them
from acting as submit buttons.

Thanks Antoliny Lee for the quick triage and review.

Regression in 857b1048d5.
2025-06-02 22:25:14 -03:00
..
__init__.py
models.py Refs #19215 -- Fixed admin_widgets tests if Pillow isn't installed. 2022-10-27 08:41:03 +02:00
test_autocomplete_widget.py Fixed #33888 -- Fixed get_select2_language() crash with no language activated. 2022-08-03 19:51:25 +02:00
tests.py Fixed #36423 -- Prevented filter_horizontal buttons from intercepting form submission. 2025-06-02 22:25:14 -03:00
urls.py Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
widgetadmin.py Fixed #19215 -- Fixed rendering ClearableFileInput when editing with invalid files. 2022-10-25 16:53:52 +02:00