Skip to main content

Search and Top Navigation

#7662 closed enhancement (fixed)

Opened August 23, 2011 07:58AM UTC

Closed February 27, 2012 03:49PM UTC

Tabs: documentation update suggested (fix for IE base href issue) jqueryui: 1.7.x; 1.8.x

Reported by: ebspromo Owned by:
Priority: minor Milestone: 1.9.0
Component: [meta] ui.docs Version: 1.8.15
Keywords: Cc:
Blocked by: Blocking:
Description

http://docs.jquery.com/UI/Tabs#...follow_a_tab.27s_URL_instead_of_loading_its_content_via_ajax

Suggests using...

location.href = url;

Problem...

IE9 (likely earlier versions as well) does not work if <base href="http://www.mydomain.com/"> is defined. IE appends the current url instead of applying the base href first. Other browsers (FF, Ch, Op, etc) handle it as expected.

Solution...

location.href = ($('base').length) ? $('base').attr('href') + url : url;

My suggested change should be 100% cross-browser compatible. Updating the docs might save a few not-so-useful questions asking why it doesn't work in IE ;)

Attachments (0)
Change History (5)

Changed August 23, 2011 09:17AM UTC by rdworth comment:1

component: ui.tabs[meta] ui.docs
summary: documentation update suggested (fix for IE base href issue) jqueryui: 1.7.x; 1.8.xTabs: documentation update suggested (fix for IE base href issue) jqueryui: 1.7.x; 1.8.x

Changed February 27, 2012 11:34AM UTC by jzaefferer comment:2

While the suggested fix may be valid, we should consider just entirely dropping that section, considering the warning already there. Its just a bad idea in the first place.

Changed February 27, 2012 03:46PM UTC by jzaefferer comment:3

Scott, any opinion on this?

Changed February 27, 2012 03:47PM UTC by scottgonzalez comment:4

I think it's horrible UX and nobody should ever do it. I'd be happy if we removed it from the FAQ.

Changed February 27, 2012 03:49PM UTC by jzaefferer comment:5

resolution: → fixed
status: newclosed

Dropped that FAQ section.