﻿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
10327	Pass document.domain to popup windows in admin	Joost Cassee	nobody	"Some applications require Javascript collaboration between views and scripts from the static media location. When these are served from different domains collaboration fails because of the [http://en.wikipedia.org/wiki/Same_origin_policy same origin policy] implemented in browsers. Scripts can still work together if they are served from subdomains with a common parent (for example, `www.example.com` and `media.example.com`) by setting the `document.domain` variable to that common parent (in the example, `example.com`).

Unfortunately, the `document.domain` variable is not automatically passed to newly opened windows. The attached patch passes the variable to popup windows in the admin interface. Currently it is always passed, but may be nicer to do so only if it is different from the real server name. There are also currently no tests; I'm unsure how to test this functionality.

The patch was tested with the TinyMCE editor, which uses the above trick for its own popup windows. The patch allows, for example, the `raw_id_fields` functionality to work again for pages with TinyMCE editors (when static files are served from a different domain).
"	Cleanup/optimization	closed	contrib.admin	dev	Normal	wontfix			Accepted	1	0	0	1	0	0
