Skip to main content

Search and Top Navigation

#6919 closed bug (duplicate)

Opened January 31, 2011 12:35PM UTC

Closed January 31, 2011 01:24PM UTC

Last modified January 31, 2011 01:24PM UTC

IE Error when opening a section for the second time

Reported by: joris Owned by:
Priority: minor Milestone: 1.9.0
Component: ui.accordion Version: 1.8.9
Keywords: Cc:
Blocked by: Blocking:
Description

Sorry if this report is a bit incomplete, I am in bit of a hurry.

On one of our websites IE9 / IE8 gives a runtime error on line 559:

$.each( fxAttrs, function( i, prop ) {
	hideProps[ prop ] = "hide";

	var parts = ( "" + $.css( options.toShow[0], prop ) ).match( /^([\\d+-.]+)(.*)$/ );
	showProps[ prop ] = {
		value: parts[ 1 ], // parts is null
		unit: parts[ 2 ] || "px"
	};
});

I am guessing this is because of the differences between computed style and current style.

The code used to create the accordion is:

$('#menu').accordion({
	header: '.menu_title',
	clearStyle: false,
	autoHeight: true,
	collapsible: true,
	animated: 'slide'
});

<div id="menu">
	<div class="box_top"></div>
	<div class="menu_item">
		<div class="menu_title">Bla bla bla</div>
		<div class="menu_content">
			bla bla bla ...
			<div style="clear:both"></div>
		</div>
	</div>
	<div class="box_bottom"></div>
	
	<div class="box_top"></div>
	<div class="menu_item">
		<div class="menu_title">Bla bla bla</div>
		<div class="menu_content">
			bla bla bla ...
			<div style="clear:both"></div>
		</div>
	</div>
	<div class="box_bottom"></div>
</div>

For now I fixed this issue by modifying it to:

$.each( fxAttrs, function( i, prop ) {
	hideProps[ prop ] = "hide";

	var parts = ( "" + $.css( options.toShow[0], prop ) ).match( /^([\\d+-.]+)(.*)$/ );
	if (parts)
	{
		showProps[ prop ] = {
			value: parts[ 1 ],
			unit: parts[ 2 ] || "px"
		};
	}
	else
	{
		showProps[ prop ] = {
			value: 0,
			unit:  "px"
		};
	}
});
Attachments (0)
Change History (2)

Changed January 31, 2011 01:24PM UTC by scottgonzalez comment:1

resolution: → duplicate
status: newclosed

Works fine for me in IE8: http://jsbin.com/uxepe5/edit. Didn't test in IE9, but this sounds like a duplicate of #6068.

Changed January 31, 2011 01:24PM UTC by scottgonzalez comment:2

Duplicate of #6068.