-
Bug
-
Resolution: Fixed
-
Major
-
4.2.3
-
None
-
All browsers, XHTML 1.0 Strict
In the admin-interface module, inline.js contains 3 document.write statements that create divs for later use by javascript. If we use <cms:links/> in the <head> of the page, this javascript will be included in the head.
Then, the browser will execute those document.writes during the loading of the <head> element, writing out divs that belong in the <body>. This causes all known browsers to begin the body element immediately in their internal representation. Thus all tags following <cms:links/> will appear in the <body>, according to the DOM.
This has always been annoyingly messy when using something like firebug to examine a document, but it also caused serious problems when including Scriptaculous, which attempts to find itself in the <head> in order to include more files, which obviously it can't do if it's been moved to the <body>.
It can be solved with the attached patch, which moves the creation of these divs to the window.onload event (in a crossplatform, unobtrusive fashion).
The file to be patched is m-m-admininterface/.../admin-js/inline.js
- depends upon
-
MAGNOLIA-3111 Load admin-js files after js-classes so the former can use the latter
- Closed