mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-10 10:24:31 +02: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:
parent
059bb99f87
commit
01c19ab634
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue