Opened 7 years ago
Closed 7 years ago
#28959 closed Bug (fixed)
Clicking "No, take me back" on the delete selected inline foreign key / one-to-one field confirmation page does nothing
Reported by: | Josh Schneier | Owned by: | nobody |
---|---|---|---|
Component: | contrib.admin | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Ready for checkin | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If you have a Foreign Key to a model that is nullable and has models.SET_NULL
as its on_delete
handler a small red x appears inline. Clicking on that brings up a popover warning. If you then click "No, take me back" to cancel the action nothing happens because it's a popover and the handler in cancel.js
is doing window.history.back()
which doesn't work for a separate window.
This exists going back to at least 1.9
Change History (7)
comment:1 by , 7 years ago
Summary: | Canceling removing inline Foreign Key does not work → Clicking "No, take me back" on the delete selected inline foreign key / one-to-one field confirmation page does nothing |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 7 years ago
comment:4 by , 7 years ago
Needs tests: | set |
---|
comment:5 by , 7 years ago
Needs tests: | unset |
---|
comment:6 by , 7 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
I'm happy to fix this but the popover code looked a bit complex. Since it's isolated to cancel.js would checking for the
is_popover
hidden field value (or in the URL) in the handler and then callingwindow.close()
if it's found be sufficient?