Opened 8 years ago

Closed 7 years ago

#7662 closed enhancement (fixed)

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 ;)

Change History (5)

comment:1 Changed 8 years ago by rdworth

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

comment:2 Changed 7 years ago by Jörn Zaefferer

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.

comment:3 Changed 7 years ago by Jörn Zaefferer

Scott, any opinion on this?

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

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

comment:5 Changed 7 years ago by Jörn Zaefferer

Resolution: fixed
Status: newclosed

Dropped that FAQ section.

Note: See TracTickets for help on using tickets.