Skip to main content

Bug Tracker

Side navigation

#10045 closed bug (fixed)

Opened August 14, 2011 03:47AM UTC

Closed August 19, 2012 08:37PM UTC

hide() with a duration fails when the element is contained within a hidden element

Reported by: jma Owned by: mikesherov
Priority: low Milestone: 1.8
Component: effects Version: 1.6.2
Keywords: Cc:
Blocked by: Blocking:
Description

Browsers tested: Firefox 5, Chrome 12

OS: Ubuntu 11.04, Windows 7

Test case: http://jsfiddle.net/JonathonMA/dpfeM/

Expected behaviour: the elements that had hide() called on them while their container was hidden should still be hidden when show() is called on the container

Actual behaviour: if any duration was specified the elements will be displayed once show() is called on the container, i.e. display: none will not be set

  • jQuery 1.2.6 works, showing the expected behaviour
  • jQuery 1.3.2 fails, but only for hide(1), hide(0) works
  • jQuery 1.4.4 (and subsequent versions up to 1.6.2 and current edge) fails, showing the bug for both hide(1) and hide(0)
Attachments (0)
Change History (6)

Changed August 14, 2011 08:37PM UTC by dmethvin comment:1

The difference is that the logic for detecting hidden elements changed from 1.2.6 (display:none) to 1.3.2 (height:0) and we don't want to go back to the old logic in general.

Changed August 23, 2011 05:31PM UTC by timmywil comment:2

component: unfiledeffects
priority: undecidedlow
status: newopen

We've seen this issue before. I think this is intuitive. Perhaps we should set display to none regardless of whether or not it is currently visible.

Changed November 01, 2011 10:02PM UTC by chriswu000 comment:3

This is still broken in 1.6.4 but seems to be fixed in the latest version in git.

Changed February 18, 2012 04:40PM UTC by Simon comment:4

I think this duplicates an other bug: http://bugs.jquery.com/ticket/7725

Changed June 19, 2012 12:47PM UTC by mikesherov comment:5

milestone: None1.next
owner: → mikesherov
status: openassigned

This is a duplicate of #7725, which John closed as wontfix, but I agree with timmywil here. We currently no-op when trying to hide an element that isn't "visible". I'm not sure if there is a reason we don't just display:none it anyway, but worth investigating. If it introduces problems, I'll close this as wontfix, but it's worth a shot.

Changed August 19, 2012 08:37PM UTC by mikesherov comment:6

milestone: 1.next1.8
resolution: → fixed
status: assignedclosed

Works as expected in 1.8