Bug Tracker

Ticket #2648 (closed bug: worksforme)

Opened 7 years ago

Last modified 3 years ago

.animate(height) incorrectly sets overflow hidden on animated div

Reported by: ericw Owned by:
Priority: minor Milestone: 1.2.4
Component: core Version: 1.2.3
Keywords: Cc:
Blocking: Blocked by:

Description

i had to create a callback like so to circumvent jquery.animate setting overflow to 'hidden' for height-animated divs:

$(myDiv).animate({ height: newHeight},{ duration: 500, queue: false, easing: 'easeOutExpo', complete: function() {
   $(myDiv).css("overflow","visible");
}});

Change History

comment:1 Changed 4 years ago by dmethvin

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

It's needed so that scroll bars won't appear.

comment:2 Changed 3 years ago by willpower232

Sorry this is a bump but you can override this behaviour by applying "overflow: visible !important" to the element you are animating.

see  http://old.nabble.com/Automatic-switching-to-overflow-hidden-during-animation-td22884304s27240.html

comment:3 Changed 3 years ago by kubo1988@…

This works great for me:

$(myDiv).animate(
   { height: newHeight},
   { duration: 500, 
     queue: false, 
     easing: 'easeOutExpo', 

     step: function() {
       $(myDiv).css("overflow","visible");
     }, 

     complete: function() {
       $(myDiv).css("overflow","visible");
     }
   }
);

comment:4 Changed 3 years ago by sindresorhus

#11399 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.