Fix #1879 -- Do not add a tab’s hash/id to location.hash if it is inside a .panel (#1881)

Co-authored-by: Raphael Michel <michel@rami.io>
This commit is contained in:
Richard Schreiber
2020-12-18 09:33:27 +01:00
committed by GitHub
parent bdf1fc2c23
commit 6afb954b93

View File

@@ -614,7 +614,10 @@ $(function () {
$('.nav-tabs a[href="#' + url.split('#')[1] + '"]').tab('show');
}
$('a[data-toggle="tab"]').on('click', function (e) {
window.location.hash = e.target.hash;
if (!$(this).closest(".tab-content").length) {
// only append hash if not inside a .panel
window.location.hash = this.hash;
}
});
// Event wizard