tickets: 10327
This data as json
id | created | changetime | last_pulled_from_trac | stage | status | component | type | severity | version | resolution | summary | description | owner | reporter | keywords | easy | has_patch | needs_better_patch | needs_tests | needs_docs | ui_ux |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
10327 | 2009-02-22 00:27:35 | 2013-03-06 09:23:34 | 2022-03-06 03:47:00.922960 | Accepted | new | contrib.admin | Bug | Normal | dev | Pass document.domain to popup windows in admin | 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). | nobody | jcassee | 0 | 1 | 1 | 0 | 0 | 0 |