X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=src%2Fcore.js;h=53d5f4a4b1601bd0c4e83a00051d659beb0aaf05;hb=3e3b86c7a7437c7b0416a2ac8385cf9403fc9e28;hp=660f7eee675b311e8f8754111cb78ccbe61fa7da;hpb=227f8b2514de31bd0b5c45ce6fc1b942c081f776;p=jquery.git diff --git a/src/core.js b/src/core.js index 660f7ee..53d5f4a 100644 --- a/src/core.js +++ b/src/core.js @@ -290,7 +290,7 @@ jQuery.fn = jQuery.prototype = { clone: function( events ) { // Do the clone var ret = this.map(function(){ - if ( jQuery.browser.msie ) { + if ( jQuery.browser.msie && !jQuery.isXMLDoc(this) ) { // IE copies events bound via attachEvent when // using cloneNode. Calling detachEvent on the // clone will also remove the events from the orignal @@ -1311,8 +1311,11 @@ jQuery.each([ "Height", "Width" ], function(i, name){ // Get document width or height this[0] == document ? - // Either scroll[Width/Height] or offset[Width/Height], whichever is greater (Mozilla reports scrollWidth the same as offsetWidth) - Math.max( document.body[ "scroll" + name ], document.body[ "offset" + name ] ) : + // Either scroll[Width/Height] or offset[Width/Height], whichever is greater + Math.max( + Math.max(document.body["scroll" + name], document.documentElement["scroll" + name]), + Math.max(document.body["offset" + name], document.documentElement["offset" + name]) + ) : // Get or set width or height on the element size == undefined ?