git.asbjorn.biz
/
jquery.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Honor stopImmediatePropagation for live/delegate event handlers. Fixes #7217.
[jquery.git]
/
src
/
css.js
diff --git
a/src/css.js
b/src/css.js
index
d0e55db
..
30cecf3
100644
(file)
--- a/
src/css.js
+++ b/
src/css.js
@@
-169,7
+169,19
@@
jQuery.each(["height", "width"], function( i, name ) {
});
}
});
}
- return val + "px";
+ if ( val <= 0 ) {
+ val = curCSS( elem, name, name );
+
+ if ( val != null ) {
+ return val === "auto" ? "" : val;
+ }
+ }
+
+ if ( val < 0 || val == null ) {
+ return elem.style[ name ];
+ }
+
+ return typeof val === "string" ? val : val + "px";
}
},
}
},
@@
-230,6
+242,9
@@
if ( getComputedStyle ) {
if ( (computedStyle = defaultView.getComputedStyle( elem, null )) ) {
ret = computedStyle.getPropertyValue( name );
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;
}
return ret;