Skip to content

Commit

Permalink
Merge branch 'bug-3333' of https://github.com/rdworth/jquery
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Mar 25, 2011
2 parents 23e8cc5 + 735a949 commit ee81d4d
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/css.js
Expand Up @@ -248,11 +248,14 @@ jQuery(function() {
get: function( elem, computed ) {
// WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
// Work around by temporarily setting element display to inline-block
var ret = "0px",
display = elem.style.display;
elem.style.display = "inline-block";
ret = getComputedStyle( elem, "margin-right", "margin-right" );
elem.style.display = display;
var ret;
jQuery.swap( elem, { "display": "inline-block" }, function() {
if ( computed ) {
ret = curCSS( elem, "margin-right", "marginRight" );
} else {
ret = elem.style.marginRight;
}
});
return ret;
}
};
Expand Down

0 comments on commit ee81d4d

Please sign in to comment.