Bug Tracker

Modify

Ticket #5148 (closed bug: invalid)

Opened 5 years ago

Last modified 3 years ago

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:
Blocking: Blocked by:

Description

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

comment:1 Changed 5 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 3 years ago by snover

  • Status changed from new to closed
  • Resolution set to invalid

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.

Please follow the  bug reporting guidlines and use  jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

View

Add a comment

Modify Ticket

Action
as closed
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.