diff options
author | Scott González <scott.gonzalez@gmail.com> | 2016-08-30 14:37:04 -0400 |
---|---|---|
committer | Scott González <scott.gonzalez@gmail.com> | 2016-08-31 07:45:09 -0400 |
commit | 398bd8dd36518ef04ffc9b7afb3a66195e78ec08 (patch) | |
tree | c0077420ef8a5a00173d659944899714aad8d7b5 | |
parent | 3a45a47968c8b45646bfc273bd257596212856a1 (diff) | |
download | jquery-ui-398bd8dd36518ef04ffc9b7afb3a66195e78ec08.tar.gz jquery-ui-398bd8dd36518ef04ffc9b7afb3a66195e78ec08.zip |
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
-rw-r--r-- | ui/widgets/tabs.js | 5 |
1 files changed, 4 insertions, 1 deletions
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 ) ); |