Opened 9 months ago

Closed 6 months 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: master
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 Changed 9 months 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 9 months 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 9 months ago by Josh Schneier

Has patch: set
Last edited 9 months ago by Tim Graham (previous) (diff)

comment:4 Changed 9 months ago by Tim Graham

Needs tests: set

comment:5 Changed 7 months ago by Josh Schneier

Needs tests: unset

comment:6 Changed 6 months ago by Carlton Gibson

Triage Stage: AcceptedReady for checkin

comment:7 Changed 6 months ago by Tim Graham <timograham@…>

Resolution: fixed
Status: newclosed

In b60e5fdb:

Fixed #28959 -- Fixed 'No, take me back' button on admin's inline popup.

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