diff options
-rw-r--r-- | AUTHORS.txt | 1 | ||||
-rw-r--r-- | src/css/defaultDisplay.js | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/AUTHORS.txt b/AUTHORS.txt index 954e97afe..5a4b804a8 100644 --- a/AUTHORS.txt +++ b/AUTHORS.txt @@ -218,4 +218,5 @@ Forbes Lindesay <forbes@lindesay.co.uk> S. Andrew Sheppard <andrew@wq.io> Roman Reiß <me@silverwind.io> Benjy Cui <benjytrys@gmail.com> +Rodrigo Rosenfeld Rosas <rr.rosas@gmail.com> diff --git a/src/css/defaultDisplay.js b/src/css/defaultDisplay.js index 45af9f90f..631b9ba8a 100644 --- a/src/css/defaultDisplay.js +++ b/src/css/defaultDisplay.js @@ -13,14 +13,15 @@ var iframe, */ // Called only from within defaultDisplay function actualDisplay( name, doc ) { - var elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), + var style, + elem = jQuery( doc.createElement( name ) ).appendTo( doc.body ), // getDefaultComputedStyle might be reliably used only on attached element - display = window.getDefaultComputedStyle ? + display = window.getDefaultComputedStyle && ( style = window.getDefaultComputedStyle( elem[ 0 ] ) ) ? // Use of this method is a temporary fix (more like optmization) until something better comes along, // since it was removed from specification and supported only in FF - window.getDefaultComputedStyle( elem[ 0 ] ).display : jQuery.css( elem[ 0 ], "display" ); + style.display : jQuery.css( elem[ 0 ], "display" ); // We don't have any data stored on the element, // so use "detach" method as fast way to get rid of the element |