Opened 10 years ago

Closed 9 years ago

#5400 closed bug (duplicate)

Error applying accordion to a hidden div

Reported by: matdumsa Owned by:
Priority: major Milestone: 1.9.0
Component: ui.accordion Version: 1.8
Keywords: Cc:
Blocked by: Blocking:

Description

jQueryUI apply height:0 to panel elements children of a hidden div when the accordion plug-in is applied.

Sometimes it is necessary to apply accordion to a hidden div.. For example, using tabs which dynamically load content the following sequence of events could occur.

  1. User click a tab,
  2. Tab is loaded, HTML is injected in the DOM
  3. Script are executed (some script here could call .accordion on the newly injected HTML)
  4. accordion panel height are set to zero because $.height() return zero on hidden elements..

I’ve created a step-by-step page that reproduce this bugs with debug output. Same thing here.. Here is a demo I’ve constructed to see how it affect us..

http://team7.ath.cx:8080/~ma_dum/sandbox/demo.html

I’ve also attached the following jQuery bug report: http://dev.jquery.com/ticket/4541#comment:5

Change History (2)

comment:1 Changed 10 years ago by Jörn Zaefferer

Version: 1.8rc31.8

Visual Testcase: http://github.com/jquery/jquery-ui/blob/master/tests/visual/compound/accordion_tabs.html - click on second tab to see the broken Accordion.

comment:2 Changed 9 years ago by Scott González

Resolution: duplicate
Status: newclosed

Duplicate of #3905.

Note: See TracTickets for help on using tickets.