andrewtite gotcha!
When clicking a tab an entry is added to LocalStorage called lastTab
, this essentially stores the last activated tab, and with the markup in the demo page this causes that behavior to trigger, as an event is added to the bootstrap event handler.
You can see this behavior as defined in app.init.js
around line 689:
/* Activate the last tab clicked using localStorage */
var lastTab = localStorage.getItem('lastTab');
$('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {
localStorage.setItem('lastTab', $(this).attr('href'));
});
if (lastTab) {
$('[href="' + lastTab + '"]').tab('show');
}
Looking around there does not seem to be a setting to toggle this behavior, so I will notify @Sunny to add a boolean
to the build.json
file and/or the main initApp script to influence this behavior. In the meantime you can include a custom site.js
or similar to your website and use this code to override the script:
$('a[data-toggle="tab"]').off().on('shown.bs.tab', function (e) {
e.preventDefault();
});
This should stop the original event from being registered on the tabs and should not trigger the LocalStorage anymore. Be sure to clear the storage using F12
in your browser!
Hope this helps,