Fix cube transition direction on forward history navigation
popstate always passed back=true, so going forward after back still rotated the cube backwards. Track an incrementing idx in history.state and only mirror the transition when the target entry is actually behind; replaceState calls now preserve the state object instead of wiping it.
This commit is contained in:
@@ -126,7 +126,7 @@ const readStats = computed(() => calcReadStats(visits.value))
|
||||
watch(range, (r) => {
|
||||
const url = new URL(location.href)
|
||||
url.hash = r
|
||||
history.replaceState(null, '', url)
|
||||
history.replaceState(history.state, '', url)
|
||||
})
|
||||
|
||||
const clients = computed(() => data.value?.clients || {})
|
||||
|
||||
Reference in New Issue
Block a user