Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#8653 closed bug (fixed)

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.

Change History (7)

comment:1 Changed 10 years ago by Scott González

Resolution: worksforme
Status: newclosed

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

comment:2 Changed 10 years ago by gsmedley

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, "" ) )
}

comment:3 Changed 10 years ago by Scott González

Resolution: worksforme
Status: closedreopened
Summary: Tabs are not working inside IFrame pageTabs are not working inside iframe in IE6/7

comment:4 Changed 10 years ago by Scott González

Status: reopenedopen

comment:5 Changed 10 years ago by petersendidit

Owner: set to 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

comment:6 Changed 10 years ago by David Petersen

Resolution: fixed
Status: assignedclosed

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

Changeset: 8ce35198daf261370e2962f4c429bf4fa998b2df

comment:7 Changed 10 years ago by tj.vantoll

#8717 is a duplicate of this ticket.

Note: See TracTickets for help on using tickets.