From 6c1151b14a19ab394842cb847ab5809d670ee71a Mon Sep 17 00:00:00 2001 From: Graham Christensen Date: Wed, 5 May 2021 14:19:49 -0400 Subject: [PATCH] lazy tabs: trigger the load event Something in the upgrade of Bootstrap and JQuery broke lazy tab loading. I don't understand what is providing the tab behavior, how it should work, or what the correct fix is. I can tell you that this patch fixes the issue: when loading a tab with a URL fragment deep-linking to a lazily loaded tab... it now loads. Close #959 --- src/root/static/js/common.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/root/static/js/common.js b/src/root/static/js/common.js index 31788834..433c06d7 100644 --- a/src/root/static/js/common.js +++ b/src/root/static/js/common.js @@ -60,6 +60,7 @@ $(document).ready(function() { /* Activates tab according to URL anchor. */ if (window.location.hash) { + setTimeout(function () { $('.nav-tabs > .nav-item:not(.dropdown) a[href="' + window.location.hash + '"]').trigger('show.bs.tab'); }, 0); $('.nav-tabs > .nav-item:not(.dropdown) a[href="' + window.location.hash + '"]').tab('show'); }