Fixed getting styles from disconnected nodes. Fixes #7148.

This commit is contained in:
Scott González 2010-10-11 15:11:03 -04:00
parent 2866f16c09
commit 22ccbf82c8
2 changed files with 6 additions and 1 deletions

View file

@ -230,6 +230,9 @@ if ( getComputedStyle ) {
if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
ret = computedStyle.getPropertyValue( name );
if ( ret === "" && !jQuery.contains( elem.ownerDocument.documentElement, elem ) ) {
ret = jQuery.style( elem, name );
}
}
return ret;