Ticket #9036 (closed bug: wontfix)
$(..).hide(XX) -- unexpected behavior for elem with either 0px width or height
|Reported by:||shadedecho||Owned by:|
If an element either has a 0px width or height (or both), but it has contents that are visible (via overflow), the expectation would be that the element would still have some sort of reasonable hiding behavior, such as the alpha fading.
However, by virtue of the fact that clipping occurs immediately, all the contents are hidden (since the 0px width or height will show nothing if overflow:hidden is applied) immediately, effectively making any smooth animation (of alpha) of the hiding of the element moot.
So, I would request one or more of the following:
- jQuery *not* apply the clipping to an element (and thus not do the animation of the width/height shrinking) if either dimension of the element is already 0px. By not applying the overflow:hidden clipping, it would leave the alpha animation hiding to still work, which I think is the most default expectation.
- Change the .hide() method to allow some option/param to tell jQuery not to try and animate the dimensions (only the alpha), and thus not apply the overflow:hidden clipping.
- Have jQuery discover the actual overflow dimensions of the element, first change the dimensions to match that measurement, and THEN do the animated hiding.
- Add some note to the documentation for .hide(), in the section where it talks about width/height being animated during hide, to call out the fact that an element with smaller dimensions that its visible content (even 0px) will get clipped immediately (not animated), and the result can be either partial or full hiding of the content immediately, without animation.
- Keywords needsdocs added
- Priority changed from undecided to low
- Status changed from new to closed
- Component changed from unfiled to effects
- Resolution set to wontfix