Opened 3 weeks ago

Last modified 4 days ago

#28959 new Bug

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: master
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: yes 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 (4)

comment:1 Changed 3 weeks ago by Tim Graham

Summary: Canceling removing inline Foreign Key does not workClicking "No, take me back" on the delete selected inline foreign key / one-to-one field confirmation page does nothing
Triage Stage: UnreviewedAccepted

comment:2 Changed 3 weeks ago by Josh Schneier

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 calling window.close() if it's found be sufficient?

comment:3 Changed 5 days ago by Josh Schneier

Has patch: set
Last edited 4 days ago by Tim Graham (previous) (diff)

comment:4 Changed 4 days ago by Tim Graham

Needs tests: set
Note: See TracTickets for help on using tickets.
Back to Top