Dont create a new history entry if tab is changed.

This made back navigation really difficult. Now URL is replaced via replaceState.
This commit is contained in:
Jan Böhmer 2020-05-11 23:34:48 +02:00
parent 059bb99f87
commit 01c19ab634

View file

@ -346,8 +346,8 @@ $(document).on("ajaxUI:reload ajaxUI:start", function () {
$('body').on('click', 'a[data-toggle=\'tab\']', function (e) { $('body').on('click', 'a[data-toggle=\'tab\']', function (e) {
e.preventDefault() e.preventDefault()
var tab_name = this.getAttribute('href') var tab_name = this.getAttribute('href')
if (history.pushState) { if (history.replaceState) {
history.pushState(null, null, tab_name) history.replaceState(null, null, tab_name)
} }
else { else {
location.hash = tab_name location.hash = tab_name