mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-03 14:06:45 +01:00
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:
@@ -346,8 +346,8 @@ $(document).on("ajaxUI:reload ajaxUI:start", function () {
|
||||
$('body').on('click', 'a[data-toggle=\'tab\']', function (e) {
|
||||
e.preventDefault()
|
||||
var tab_name = this.getAttribute('href')
|
||||
if (history.pushState) {
|
||||
history.pushState(null, null, tab_name)
|
||||
if (history.replaceState) {
|
||||
history.replaceState(null, null, tab_name)
|
||||
}
|
||||
else {
|
||||
location.hash = tab_name
|
||||
|
||||
Reference in New Issue
Block a user