Bug Tracker

Modify

Ticket #4860 (closed bug: wontfix)

Opened 5 years ago

Last modified 2 years ago

slideToggle not working with height: auto and all floating elements

Reported by: capsule Owned by:
Priority: low Milestone: 1.next
Component: effects Version: 1.4.4
Keywords: slideToggle slideUp float height needsreview Cc:
Blocking: Blocked by:

Description

Hi,

If you apply a slideToggle() effect on an element which height is defined as "auto" in your CSS file and all contained elements are floating (in my case, one element floating left and another floating right), the slideDown works but not the slideUp (it disappear and then slideDown again). I guess this is because the container on which I try to apply the effect has no height due to the floating only elements.

If I define a fixed height on the container, the toggle effect works.

Btw, this is affecting the "slideUp" effect as well (not working, for the same reason I guess).

Maybe jQuery should calculate the height of the container based on its children's height?

HTH, Regards.

Change History

comment:1 Changed 4 years ago by dmethvin

  • Component changed from unfiled to fx

comment:2 Changed 4 years ago by dmethvin

  • Summary changed from slideToogle not working with height: auto and all floating elements to slideToggle not working with height: auto and all floating elements

comment:3 Changed 3 years ago by snover

#5131 is a duplicate of this ticket.

comment:4 Changed 3 years ago by snover

  • Keywords needsreview added
  • Priority changed from major to low
  • Version changed from 1.3.2 to 1.4.4
  • Milestone 1.4 deleted

comment:5 Changed 3 years ago by bardobrave@…

I've found similar behaviour when applying slideUp/slideDown effects to block elements floated:

if element is directly floated (I mean, not inheriting floating from ancestor element), slideUp/slideDown effects only hide/show the element, but the animation is not shown.

if the floating is moved upside to an ancestor slideUp/slideDown works fine.

I hope it helps to track and fix this problem.

comment:6 Changed 3 years ago by timmywil

  • Status changed from new to closed
  • Resolution set to wontfix
  • Milestone set to 1.next

I don't think this is something we want to change. There are many resources for doing clearfixes and jQuery is correctly animating the height of 0.

comment:7 Changed 2 years ago by pinto.carlosd@…

A similar behavior occurs when using min-height instead of height. The target div just appears and disappears without showing the sliding effect.

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.