Opened 6 weeks ago
Last modified 22 hours ago
#35943 assigned Cleanup/optimization
Remove deprecated 'unload' event listener
Reported by: | Adam Johnson | Owned by: | Pooja Vishwakarma |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | yes |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
Loading any ModelAdmin page in Chrome 117+ triggers this warning:
Unload event listeners are deprecated and will be removed. 1 source RelatedObjectLookups.js:203 https://chromestatus.com/feature/5579556305502208
The linked proposal points to pagehide as a more reliable alternative, which seems like it would be compatible with the goal of closing child popups.
Change History (5)
comment:1 by , 6 weeks ago
Description: | modified (diff) |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 13 days ago
Owner: | set to |
---|---|
Status: | new → assigned |
comment:3 by , 7 days ago
Has patch: | set |
---|
comment:5 by , 22 hours ago
Patch needs improvement: | set |
---|
Note:
See TracTickets
for help on using tickets.
Thank you Adam for taking the time to create this ticket, and for linking adequate resources to do proper triage.
I'm accepting on the basis that this makes sense but I would like to see more research being done regarding what to use to replace
unload
. The linked MDN docs say:Is not immediately clear to me that this is a good replacement. From these Chrome docs we may need to evaluate
visbilitychange
as well.