Bug Tracker

Opened 9 years ago

Closed 8 years ago

Last modified 8 years ago

#8156 closed bug (wontfix)

show/hide in hidden div

Reported by: thomas@… Owned by:
Priority: low Milestone: 1.next
Component: effects Version: 1.5
Keywords: Cc:
Blocked by: Blocking:

Description

I'm trying to toggle the display of a div ('b') nested insite another div ('a') that can either be visible or hidden. Using the toggle() function on 'b', it cannot be hidden if 'a' is hidden. Toggling works fine if 'a' is visible. I have tried the same using DOM and it works fine. See an example here: http://jsfiddle.net/SuKNh/

Change History (5)

comment:1 Changed 9 years ago by Rick Waldron

Component: unfiledeffects
Priority: undecidedlow
Status: newopen

Confirmed.

Click the buttons in this pattern to reproduce:

A B A B A

comment:3 Changed 8 years ago by gnarf

Resolution: wontfix
Status: openclosed

After taking a further look at this one, the behavior makes perfect sense. If you need to be toggling the display property on the element you can use .show() and .hide() instead of .toggle().

comment:4 Changed 8 years ago by thomas@…

It does not make sense to me. Then where will be no use of .toggle(), as you allways can use .show() and .hide(). In my case, I needed to toogle the display, and yes, I could do this in other ways, but why not fix the bug in the .toggle() so that it works as expected?

comment:5 Changed 8 years ago by ajpiano

We are not fixing this "bug" because we do not believe it is a bug. toggle() of course has a usecase, it just can't be used to toggle the display of something that is itself inside of a hidden container.

Note: See TracTickets for help on using tickets.