From 398bd8dd36518ef04ffc9b7afb3a66195e78ec08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Scott=20Gonz=C3=A1lez?= Date: Tue, 30 Aug 2016 14:37:04 -0400 Subject: [PATCH] Tabs: Strip hash from remote content URLs As of jQuery 3.0.0, hashes are no longer stripped for Ajax requests. This causes issues in IE <11, so we need to strip this before making the request. Ref jquery/jquery#1732 Closes gh-1736 --- ui/widgets/tabs.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/ui/widgets/tabs.js b/ui/widgets/tabs.js index 209d0febc..0dd165d4a 100644 --- a/ui/widgets/tabs.js +++ b/ui/widgets/tabs.js @@ -889,7 +889,10 @@ $.widget( "ui.tabs", { _ajaxSettings: function( anchor, event, eventData ) { var that = this; return { - url: anchor.attr( "href" ), + + // Support: IE <11 only + // Strip any hash that exists to prevent errors with the Ajax request + url: anchor.attr( "href" ).replace( /#.*$/, "" ), beforeSend: function( jqXHR, settings ) { return that._trigger( "beforeLoad", event, $.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );