replace cssPropsAware branch

This commit is contained in:
louisremi 2011-04-11 20:33:52 +02:00
parent 56ffad2dad
commit 272b8d69dc
2 changed files with 25 additions and 5 deletions

View file

@ -377,3 +377,17 @@ test("marginRight computed style (bug #3333)", function() {
equals($div.css("marginRight"), "0px");
});
test("jQuery.cssProps behavior, (bug #8402)", function() {
var div = jQuery( "<div>" ).appendTo(document.body).css({
position: "absolute",
top: 0,
left: 10
});
jQuery.cssProps.top = "left";
equal( div.css("top"), "10px", "the fixed property is used when accessing the computed style");
div.css("top", "100px");
equal( div[0].style.left, "100px", "the fixed property is used when setting the style");
// cleanup jQuery.cssProps
jQuery.cssProps.top = undefined;
});