Skip to main content

Search and Top Navigation

#8653 closed bug (fixed)

Opened October 11, 2012 07:58AM UTC

Closed October 17, 2012 03:00AM UTC

Last modified October 23, 2012 12:17PM UTC

Tabs are not working inside iframe in IE6/7

Reported by: pvipul Owned by: petersendidit
Priority: minor Milestone: 1.9.1
Component: ui.tabs Version: 1.9.0
Keywords: Cc:
Blocked by: Blocking:
Description

The tabs are functioning properly in normal page, but when i put the same page in IFrame, the Tabs are not functioning properly.

The content of tabs is getting display one after another on first tab.

Attachments (0)
Change History (7)

Changed October 11, 2012 12:52PM UTC by scottgonzalez comment:1

resolution: → worksforme
status: newclosed

Tabs work fine in iframes, just look at http://jqueryui.com/tabs/ for proof.

Changed October 16, 2012 11:50AM UTC by gsmedley comment:2

In IE6 I see the problem here: http://jqueryui.com/tabs/

Local tabs in IE6 in an iframe are not detected as local because the isLocal( anchor ) function appears to use the outer ref rather than the one in the iframe. Since they are treated as remote tabs the tab content divs aren't hidden resulting in the content of tabs getting displayed one after another on the first tab.

I worked around this by modifying isLocal() to compare against the un-cloned node as well as the cloned one, but this doesn't address the original ie6 normalization killing problem.

function isLocal( anchor ) {
	// clone the node to work around IE 6 not normalizing the href property
	// if it's manually set, i.e., a.href = "#foo" kills the normalization
	// GS - This trick doesn't work when the tab control is in an iframe
	//      compare to original anchor too. 
	var anchor1 = anchor.cloneNode( false );
	return anchor1.hash.length > 1 &&
		( anchor1.href.replace( rhash, "" ) === location.href.replace( rhash, "" ) ||
		  anchor.href.replace( rhash, "" ) === location.href.replace( rhash, "" ) )
}

Changed October 16, 2012 01:51PM UTC by scottgonzalez comment:3

resolution: worksforme
status: closedreopened
summary: Tabs are not working inside IFrame pageTabs are not working inside iframe in IE6/7

Changed October 16, 2012 01:51PM UTC by scottgonzalez comment:4

status: reopenedopen

Changed October 16, 2012 04:17PM UTC by petersendidit comment:5

owner: → petersendidit
status: openassigned

Looks like we can either handle IE6 not normalizing the href property if its manually set OR handle tabs in a iframe for IE 6/7. Because we are dropping support for IE6 in 1.10 we are going to not handle the IE6 normalizing problem.

Pull request: https://github.com/jquery/jquery-ui/pull/758

Changed October 17, 2012 03:00AM UTC by David Petersen comment:6

resolution: → fixed
status: assignedclosed

Tabs: Remove anchor clone in isLocal. Fixed #8653 - Tabs are not working inside iframe in IE6/7.

Changeset: 8ce35198daf261370e2962f4c429bf4fa998b2df

Changed October 23, 2012 12:17PM UTC by tj.vantoll comment:7

#8717 is a duplicate of this ticket.