Opened 4 months ago

Last modified 4 months ago

#36354 closed Cleanup/optimization

Remove unneeded JS from contrib.admin password forms — at Version 2

Reported by: Fabian Braun Owned by:
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 Fabian Braun)

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.html and admin/auth/user/add_form.html to not load the JS file

Change History (2)

comment:1 by Fabian Braun, 4 months ago

Easy pickings: set
Summary: Remove unneeded JS from contrib.adminRemove unneeded JS from contrib.admin password forms

comment:2 by Fabian Braun, 4 months ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top