mirror of
https://github.com/jquery/jquery.git
synced 2024-11-23 02:54:22 +00:00
CSS: fix for disconnected elems on doc fragments in Opera 12
This commit is contained in:
parent
b536cd561f
commit
f1d1d399ec
@ -12,15 +12,18 @@ function curCSS( elem, name, computed ) {
|
|||||||
style = elem.style;
|
style = elem.style;
|
||||||
|
|
||||||
computed = computed || getStyles( elem );
|
computed = computed || getStyles( elem );
|
||||||
|
ret = computed ? computed.getPropertyValue( name ) || computed[ name ] : undefined;
|
||||||
|
|
||||||
|
// Support: Opera 12.1x only
|
||||||
|
// Fall back to style even without computed
|
||||||
|
// computed is undefined for elems on document fragments
|
||||||
|
if ( ( ret === "" || ret === undefined ) && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
||||||
|
ret = jQuery.style( elem, name );
|
||||||
|
}
|
||||||
|
|
||||||
// Support: IE9
|
// Support: IE9
|
||||||
// getPropertyValue is only needed for .css('filter') (#12537)
|
// getPropertyValue is only needed for .css('filter') (#12537)
|
||||||
if ( computed ) {
|
if ( computed ) {
|
||||||
ret = computed.getPropertyValue( name ) || computed[ name ];
|
|
||||||
|
|
||||||
if ( ret === "" && !jQuery.contains( elem.ownerDocument, elem ) ) {
|
|
||||||
ret = jQuery.style( elem, name );
|
|
||||||
}
|
|
||||||
|
|
||||||
// A tribute to the "awesome hack by Dean Edwards"
|
// A tribute to the "awesome hack by Dean Edwards"
|
||||||
// Android Browser returns percentage for some values,
|
// Android Browser returns percentage for some values,
|
||||||
|
Loading…
Reference in New Issue
Block a user