Bug Tracker

Opened 13 years ago

Closed 12 years ago

#5148 closed bug (invalid)

animate({height: xx}) computed incorrectly height before animation when element have a padding

Reported by: TNT Owned by: brandon
Priority: major Milestone: 1.4
Component: dimensions Version: 1.3.2
Keywords: Cc:
Blocked by: Blocking:


I decided to try out (from full height -> to height smaller than original) animate({height: '1px'}) but found that computed incorrectly height before animation. my element have 'padding: 5px;'.

test case can found at http://tnt-soft.net/bug/tooltip2.htm

first element don't have any padding, second element have padding: 5px. I use jquery-nightly v1.3.3pre Revision: 6300

Change History (2)

comment:1 Changed 13 years ago by TNT

Now test case is more informative about height of elements and it is use most fresh version of jquery-nightly (revision 6529), but bug is still exists.

comment:2 Changed 12 years ago by snover

Resolution: invalid
Status: newclosed

Thanks for the report, but I don’t see any bug here. jQuery correctly animates the height of the element. According to the w3c box model, padding is separate from content height. If you want to hide it completely, please use slideUp.

Note: See TracTickets for help on using tickets.