mirror of
https://github.com/django/django.git
synced 2024-12-22 17:16:24 +00:00
Fixed #33491 -- Fixed change-list selected row-highlight on cancelled delete.
Selected rows where not highlighted when returning to the change-list after clicking "No, take me back" on the deletion confirmation page. This commit uses the CSS :has() pseudo-class to apply the highlight without requiring the .selected class, which is added by JavaScript on the click event. Once all supported browsers have :has() available, the .selected selector and the JavaScript to add the class can be removed. Co-authored-by: Carlton Gibson <carlton.gibson@noumenal.es>
This commit is contained in:
parent
d46cc15c51
commit
0aa2f16e63
@ -258,7 +258,10 @@
|
|||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
#changelist table tbody tr.selected {
|
/* 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 table tbody tr:has(input[type=checkbox]:checked) {
|
||||||
background-color: var(--selected-row);
|
background-color: var(--selected-row);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user