Fixes #9109. When jQuery is loaded in the body, then the fake body element used in support has to be inserted before the document's body for boxModel to be properly detected (got the hint by looking at the code in jQuery mobile). Test page added so that we can keep checking this.
This commit is contained in:
parent
18b1cf2942
commit
efd0fce7a1
2 changed files with 36 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
jQuery.support = (function() {
|
||||
|
||||
var div = document.createElement( "div" ),
|
||||
documentElement = document.documentElement,
|
||||
all,
|
||||
a,
|
||||
select,
|
||||
|
@ -150,7 +151,7 @@ jQuery.support = (function() {
|
|||
body.style[ i ] = bodyStyle[ i ];
|
||||
}
|
||||
body.appendChild( div );
|
||||
document.documentElement.appendChild( body );
|
||||
documentElement.insertBefore( body, documentElement.firstChild );
|
||||
|
||||
// Check if a disconnected checkbox will retain its checked
|
||||
// value of true after appended to the DOM (IE6/7)
|
||||
|
@ -210,7 +211,7 @@ jQuery.support = (function() {
|
|||
|
||||
// Remove the body element we added
|
||||
body.innerHTML = "";
|
||||
document.documentElement.removeChild( body );
|
||||
documentElement.removeChild( body );
|
||||
|
||||
// Technique from Juriy Zaytsev
|
||||
// http://thinkweb2.com/projects/prototype/detecting-event-support-without-browser-sniffing/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue