Opened 6 months ago
Closed 6 months ago
#36354 closed Cleanup/optimization (fixed)
Remove unneeded JS from contrib.admin password forms
| Reported by: | Fabian Braun | Owned by: | Fabian Braun |
|---|---|---|---|
| Component: | contrib.admin | Version: | dev |
| Severity: | Normal | Keywords: | |
| Cc: | Nick Pope, Mariusz Felisiak, David Bogar | Triage Stage: | Ready for checkin |
| Has patch: | yes | Needs documentation: | no |
| Needs tests: | no | Patch needs improvement: | no |
| Easy pickings: | yes | UI/UX: | no |
Description (last modified by )
As part of ticket-34429 (https://code.djangoproject.com/ticket/34429) JS was added to the password change and user create forms to ensure that the forms run on browsers that do not support the :has() CSS selector.
By now, all major browsers support the selector. The last one not supporting it (Firefox 115 ESR - https://support.mozilla.org/en-US/kb/firefox-users-windows-7-8-and-81-moving-extended-support#:~:text=Mozilla%20is%20providing%20critical%20security,supported%20version%20of%20Microsoft%20Windows.) is reaching end-of support in August 2025, i.e. before the next major Django release.
(See discussion here: https://github.com/django/django/pull/16942/files#r1427864863)
Steps to solve the issue:
- Remove
admin/js/unusable_password_field.js - Update
admin/auth/user/chamge_password.htmlandadmin/auth/user/add_form.htmlto not load the JS file
Change History (11)
comment:1 by , 6 months ago
| Easy pickings: | set |
|---|---|
| Summary: | Remove unneeded JS from contrib.admin → Remove unneeded JS from contrib.admin password forms |
comment:2 by , 6 months ago
| Description: | modified (diff) |
|---|
comment:3 by , 6 months ago
| Cc: | added |
|---|---|
| Triage Stage: | Unreviewed → Accepted |
comment:4 by , 6 months ago
| Version: | 5.2 → dev |
|---|
Given that the most recent version to not support the :has() selector is going EOL in August, I think it should be safe to remove this in 6.0.
Updated version to dev, needs implementation.
comment:5 by , 6 months ago
| Cc: | added |
|---|
comment:6 by , 6 months ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
comment:7 by , 6 months ago
| Has patch: | set |
|---|
comment:8 by , 6 months ago
| Has patch: | unset |
|---|
I'm unsetting the flag because it's showing in the review queue because of it. However, there is no PR linked to this ticket to review.
comment:9 by , 6 months ago
| Has patch: | set |
|---|
It's here: PR. When in doubt, the beige box above the comments always has hints about taking the next step in Trac.
comment:10 by , 6 months ago
| Triage Stage: | Accepted → Ready for checkin |
|---|
Based off my understanding, it is reasonable to remove the JavaScript for the 6.0 release