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
This commit is contained in:
Scott González 2016-08-30 14:37:04 -04:00
parent 3a45a47968
commit 398bd8dd36

View File

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