﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
36284	Related lookup popup doesn't close after selecting an existing item	Matthias Kestenholz	Natalia Bidart	"https://github.com/django/django/commit/91bebf1adb43561b54bac18e76224759dc70acb3 broke the functionality by accessing `window.relatedWindows` instead of the module-local `relatedWindows` variable; `window.relatedWindows` is only defined when running the tests but not when running in the browser. 

This affects all projects using `raw_id_fields` to select existing objects.

The patch attached here fixes the problem and the unit test, but it's obviously really ugly.

The problem wasn't discovered by me but by https://github.com/yoshson/ . I'm reporting this here and now because of the expected release date of Django 5.2."	Bug	closed	contrib.admin	5.2	Release blocker	fixed	RelatedObjectLookups		Ready for checkin	1	0	0	0	0	0
