Ticket #4444 (closed bug: fixed)

Opened 6 years ago

Last modified 5 years ago

Accordion - Content disappears with autoHeight set to false in IE 6

Reported by: MikaJ Owned by:
Priority: minor Milestone: 1.8
Component: ui.accordion Version: 1.7.1
Keywords: Cc:
Blocking: Blocked by:

Description

If you set an accordion's autoHeight=false and the content area has an <a> tag, that tag will disappear once you open that section of the accordion.

Only in IE6. Firefox doesn't exhibit this problem.

Sample:

<!doctype html>
<html lang="en">
<head>
	<title>jQuery UI Accordion - No Auto Height</title>
	<link rel="stylesheet" href="http://static.jquery.com/ui/css/base2.css" type="text/css" media="screen" />
	<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/themes/ui-lightness/jquery-ui.css" type="text/css" media="screen" />

	<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
	<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.1/jquery-ui.min.js" type="text/javascript"></script>

	<script type="text/javascript">
	$(function() {
		$("#accordion").accordion({
			autoHeight: false
		});
	});
	</script>
</head>
<body>

<div class="demo">

<div id="accordion" >
	<h3><a href="#">Section 1</a></h3>
	<div >		 		 		 
		Accordion Content 1<br>
		<a href="#">Link Test #1</a>
	</div> 

	<h3><a href="#">Section 2</a></h3>
	<div>
		<a href="#" >Accordion Content 2</a>
	</div>
	<h3><a href="#">Section 3</a></h3>
	<div>
		<p>Accordion Content 3 </p>
		<ul>
			<li>List item</li>
			<li>List item</li>
			<li>List item</li>
			<li>List item</li>
			<li>List item</li>
			<li>List item</li>
			<li>List item</li>
		</ul>
	</div>
</div>

</div><!-- End demo -->
</body>
</html>

Change History

comment:1 Changed 6 years ago by scott.gonzalez

  • Milestone changed from TBD to 1.8

comment:2 Changed 6 years ago by kbwood

I had the same problem with input fields. It was solved by forcing "layout" on the content divs with

.contentDiv {

zoom: 1;

}

comment:3 Changed 6 years ago by nodster

The generic solution is to use:

.ui-accordion-content{ zoom: 1; }

This should be added into the default stylesheet for the accordian ui. Nice catch kbwood!

comment:4 Changed 5 years ago by smadep

you just saved my weekend!!!!! thx!

comment:5 Changed 5 years ago by joern.zaefferer

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in r3039. This also seemed to fix a lot of flickering in IE6.

Note: See TracTickets for help on using tickets.