Skip to content
Permalink
Browse files

Make sure that some height/width is set for the nothiddendiv before c…

…hecking.
  • Loading branch information
jeresig committed Dec 16, 2009
1 parent f078e93 commit de659859333c4e1a7840cc8d43765f47fcf53e9f
Showing with 2 additions and 0 deletions.
  1. +2 −0 test/unit/css.js
@@ -12,6 +12,8 @@ test("css(String|Hash)", function() {
ok( jQuery('#nothiddendiv').is(':visible'), 'Modified CSS display: Assert element is visible');

// handle negative numbers by ignoring #1599, #4216
jQuery('#nothiddendiv').css({ 'width': 1, 'height': 1 });

var width = parseFloat(jQuery('#nothiddendiv').css('width')), height = parseFloat(jQuery('#nothiddendiv').css('height'));
jQuery('#nothiddendiv').css({ width: -1, height: -1 });
equals( parseFloat(jQuery('#nothiddendiv').css('width')), width, 'Test negative width ignored')

0 comments on commit de65985

Please sign in to comment.
You can’t perform that action at this time.