Side navigation
#5564 closed bug (invalid)
Opened November 29, 2009 07:40AM UTC
Closed September 30, 2010 08:39PM UTC
toggle() fails for elements with height=0
Reported by: | jdrowell | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 1.4 |
Component: | core | Version: | 1.3.2 |
Keywords: | toggle, height | Cc: | |
Blocked by: | Blocking: |
Description
When a <div> (e.g.) contains only floated elements, it's height remains at 0, even though there is visible content "inside" it (semantically). jQuery seems to check for height=0 when it toggles items, 'cause they'll be shown but not hidden in this case. I vote for toggling the display property even when height=0.
Attachments (0)
Change History (1)
Changed September 30, 2010 08:39PM UTC by comment:1
need: | Review → Test Case |
---|---|
resolution: | → invalid |
status: | new → closed |
Semantically speaking, although the <div> may contain elements that are present, unless an explicit height has been set in CSS for the <div> you wouldn't be able to see it nor any of the items (ie. they wouldn't be visible on screen).
Were we to not check for height being defined, we risk breaking standard CSS behavior by making toggle display content even when a height hasn't been defined.
In my opinion this is behavior which may be okay to define in a user/developer's own application but shouldn't be generalized to the core.
Please also remember to submit a working code example replicating the behavior you are submitting a bug fix or feature request for as this makes it easier for us to verify the behavior you're describing.