Bug Tracker

Opened 8 years ago

Closed 7 years ago

#10045 closed bug (fixed)

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)

Change History (6)

comment:1 Changed 8 years ago by dmethvin

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.

comment:2 Changed 8 years ago by timmywil

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.

comment:3 Changed 7 years ago by chriswu000

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

comment:4 Changed 7 years ago by Simon

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

comment:5 Changed 7 years ago by mikesherov

Milestone: None1.next
Owner: set to 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.

comment:6 Changed 7 years ago by mikesherov

Milestone: 1.next1.8
Resolution: fixed
Status: assignedclosed

Works as expected in 1.8

Note: See TracTickets for help on using tickets.