Skip to content

Commit 398bd8d

Browse files
committed
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 jquerygh-1736
1 parent 3a45a47 commit 398bd8d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

ui/widgets/tabs.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,10 @@ $.widget( "ui.tabs", {
889889
_ajaxSettings: function( anchor, event, eventData ) {
890890
var that = this;
891891
return {
892-
url: anchor.attr( "href" ),
892+
893+
// Support: IE <11 only
894+
// Strip any hash that exists to prevent errors with the Ajax request
895+
url: anchor.attr( "href" ).replace( /#.*$/, "" ),
893896
beforeSend: function( jqXHR, settings ) {
894897
return that._trigger( "beforeLoad", event,
895898
$.extend( { jqXHR: jqXHR, ajaxSettings: settings }, eventData ) );

0 commit comments

Comments
 (0)