Skip to main content

Search and Top Navigation

#7199 closed bug (fixed)

Opened March 24, 2011 11:46AM UTC

Closed May 16, 2011 03:33PM UTC

tabs destroy functionality broken

Reported by: Herbalite Owned by: Herbalite
Priority: minor Milestone: 1.9.0
Component: ui.tabs Version: 1.8.11
Keywords: Cc:
Blocked by: Blocking:
Description

I saw this error before, but only since FF4 it's always there. So I took my time to investigate a bit

Here is how to reproduce this error.

Build a custom download over http://jqueryui.com/download

Modify the index.html demo page

from

//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
					function() { $(this).addClass('ui-state-hover'); }, 
					function() { $(this).removeClass('ui-state-hover'); }
				);

to

//hover states on the static widgets
$('#dialog_link, ul#icons li').hover(
					function() { $(this).addClass('ui-state-hover'); }, 
					function() { $(this).removeClass('ui-state-hover'); }
				);

				$(window).unload(function() {
					$('#tabs').tabs('destroy'); 
					}
				);

Reload the page in FF4 with Firebug Console open. Also keep old error messages on.

Error message appears

this.panels is null

in jquery.ui.tabs.js this is in the function abort() line 673

I have not much idea of the inner workings, but I noticed the lines

225 to 230 in jquery.ui.tabs.js which is indicated to be an IE6 hack and

amongst other things does a

self.panels = null in line 229

I removed self.panels from being set to null. The original error then disappeared, but I was getting another error this.lis is null which is in function _cleanup() line 91

At that point I abandoned hope to patch this issue myself. The quick fix would be to check for if (this.panels == null), etc. But that cures the symptoms and not the real issue which is that all the unload logic never gets run through properly.

Commenting out lines 229 does silence Firebug, but if that's the proper solution, and what IE6 does with it I don't know.

Attachments (0)
Change History (3)

Changed March 28, 2011 08:57PM UTC by gnarf comment:1

owner: → Herbalite
status: newpending

Using http://jsfiddle.net/enW6k/5/show/ I only get the "unload called" console message in FF 4... Are you still able to reproduce this / can you update that fiddle?

Changed March 28, 2011 11:16PM UTC by Herbalite comment:2

_comment0: I'm not familiar with jsFiddle. \ \ So I saved your demo and changed the following line \ \ $('#tabs').tabs('destroy'); \ \ to \ \ $('#example').tabs('destroy'); \ \ And the error showed up again in the console.1301356541885945
status: pendingnew

I'm not familiar with jsFiddle.

So I saved your demo and changed the following line

$('#tabs').tabs('destroy');

to

$('#example').tabs('destroy');

And the error showed up again in the console.

Update: Here's the fork that shows the error

http://jsfiddle.net/Herbalite/UhHcj/show/

Changed May 16, 2011 03:33PM UTC by scottgonzalez comment:3

resolution: → fixed
status: newclosed

That code is gone in master.