Merge branch 'fix_8402' of https://github.com/lrbabe/jquery into lrbabe-fix_8402
This commit is contained in:
commit
db80ad94d5
2 changed files with 25 additions and 5 deletions
|
@ -395,3 +395,17 @@ test("$().css override !important css declarations (bug #4427)", function(){
|
|||
equals( div.css("background-color"), "rgb(0, 255, 0)", "Background color is overrided to rgb(0, 255, 0)" );
|
||||
|
||||
});
|
||||
|
||||
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;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue