From 1d9d32389c652edc56ada65116d39789896f4820 Mon Sep 17 00:00:00 2001 From: Neeraj Kumar Date: Wed, 7 Jun 2023 02:13:57 +0530 Subject: [PATCH] Fixed #34638 -- Fixed admin change list selected row highlight on editable boolean fields. Regression in 0aa2f16e63887d6053f6fd0da19254fc74c750ae. Thanks Andrei Shabanski for the report. --- django/contrib/admin/static/admin/css/changelists.css | 8 ++++---- docs/releases/4.2.3.txt | 4 ++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/django/contrib/admin/static/admin/css/changelists.css b/django/contrib/admin/static/admin/css/changelists.css index 01c1c5f4f23..62a73ec81c4 100644 --- a/django/contrib/admin/static/admin/css/changelists.css +++ b/django/contrib/admin/static/admin/css/changelists.css @@ -257,19 +257,19 @@ /* Once the :has() pseudo-class is supported by all browsers, the tr.selected selector and the JS adding the class can be removed. */ -#changelist table tbody tr.selected { +#changelist tbody tr.selected { background-color: var(--selected-row); } -#changelist table tbody tr:has(input[type=checkbox]:checked) { +#changelist tbody tr:has(.action-select:checked) { background-color: var(--selected-row); } @media (forced-colors: active) { - #changelist table tbody tr.selected { + #changelist tbody tr.selected { background-color: SelectedItem; } - #changelist table tbody tr:has(input[type=checkbox]:checked) { + #changelist tbody tr:has(.action-select:checked) { background-color: SelectedItem; } } diff --git a/docs/releases/4.2.3.txt b/docs/releases/4.2.3.txt index 66d6611b36f..4ab29b0cff0 100644 --- a/docs/releases/4.2.3.txt +++ b/docs/releases/4.2.3.txt @@ -11,3 +11,7 @@ Bugfixes * Fixed a regression in Django 4.2 that caused incorrect alignment of timezone warnings for ``DateField`` and ``TimeField`` in the admin (:ticket:`34645`). + +* Fixed a regression in Django 4.2 that caused incorrect highlighting of rows + in the admin changelist view when ``ModelAdmin.list_editable`` contained a + ``BooleanField`` (:ticket:`34638`).