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 Tim Graham, 7 years ago

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 by Josh Schneier, 7 years ago

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 by Josh Schneier, 7 years ago

Has patch: set
Last edited 7 years ago by Tim Graham (previous) (diff)

comment:4 by Tim Graham, 7 years ago

Needs tests: set

comment:5 by Josh Schneier, 7 years ago

Needs tests: unset

comment:6 by Carlton Gibson, 7 years ago

Triage Stage: AcceptedReady for checkin

comment:7 by Tim Graham <timograham@…>, 7 years ago

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