Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed #36284, Refs #31170 -- Ensured related lookup popups are closed properly. #19328

Merged
merged 1 commit into from
Apr 1, 2025

Conversation

nessita
Copy link
Contributor

@nessita nessita commented Apr 1, 2025

Trac ticket number

ticket-36284

Branch description

In the admin, when selecting related objects via the helpers defined in RelatedObjectLookups.js, the dismissRelatedLookupPopup function was attempting to access window.relatedWindows, which does not exist in real execution, causing related lookup popups to remain open.

This change ensures that this code correctly accesses the module-local relatedWindows by explicitly assigning it to window.relatedWindows.

Regression in 91bebf1.

Thanks Matthias Kestenholz for the report and for test further testing.

Checklist

  • This PR targets the main branch.
  • The commit message is written in past tense, mentions the ticket number, and ends with a period.
  • I have checked the "Has patch" ticket flag in the Trac system.
  • I have added or updated relevant tests.

… properly.

In the admin, when selecting related objects via the helpers defined in
`RelatedObjectLookups.js`, the `dismissRelatedLookupPopup` function was
attempting to access `window.relatedWindows`, which does not exist in
real execution, causing related lookup popups to remain open.

This change ensures that this code correctly accesses the module-local
`relatedWindows` by explicitly assigning it to `window.relatedWindows`.

Regression in 91bebf1.

Thanks Matthias Kestenholz for the report and for test further testing.

Co-authored-by: Matthias Kestenholz <[email protected]>
@nessita nessita changed the title Fixed #36284 -- Ensured related lookup popups are closed properly. Fixed #36284, Refs #31170 -- Ensured related lookup popups are closed properly. Apr 1, 2025
@nessita
Copy link
Contributor Author

nessita commented Apr 1, 2025

@matthiask Hi! Thanks for your ticket and assistance. 🌟
This is ready for review if you fancy, and also confirmation that this fixes the reported issue is welcomed. Thanks again!

Copy link
Contributor

@sarahboyce sarahboyce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

@matthiask matthiask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the fast turnaround! That's exactly what I have locally so I'm very confident that this fixes the issue.

@nessita nessita merged commit a245604 into django:main Apr 1, 2025
31 checks passed
@nessita nessita deleted the ticket-36284 branch April 1, 2025 16:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants