• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Lack of interest JS Tabs and browserhistory

xf_phantom

Well-known member
#1
The JS Tabs need really a browserhistory feature.
I think there's a suggestion for this, but the xenforo tabs are a huge pain and that's why i'm posting it as bug!
Specially because "all" other pages, which i'm visiting daily already support the browserhistory.

examples:
members pages, search => you can switch the tabs and use the browserhistory to go back & forward
it's working as expected, (because they're only visual elements)

what's new page, memberprofile you can switch the tabs, but can't use the browserhistory, if you use it, you'll get back to the previous page and not previous tab
not working as expected, can't use the browser back button
 

Chris D

XenForo developer
Staff member
#4
I can't see this being a bug. After all, the behaviour you describe as unexpected actually is expected depending on the tab.

Some tabs are links to other pages, other tabs hide a block of content while revealing another block of content on the same page. If there is a way of logging those same page content tabs as browser history, sure, but if there is I never knew about it.
 

James

Well-known member
#5
I can't see this being a bug. After all, the behaviour you describe as unexpected actually is expected depending on the tab.

Some tabs are links to other pages, other tabs hide a block of content while revealing another block of content on the same page. If there is a way of logging those same page content tabs as browser history, sure, but if there is I never knew about it.
Can't you use history.pushState()?
 

James

Well-known member
#8
Bug because it's not expected behavior and inconsistent if you compare the behavior of the tabs on http://xenforo.com/community/online/ and http://xenforo.com/community/members/xf_phantom.46429/
It might not be expected to you, but it's expected.

The online page appends a query string to the URL, forcing the browser history to be updated.
The member page loads the data via AJAX and doesn't update the URL (hence no browser history as the page hasn't moved).

It's possible to implement browser history here, but it's not by any means a bug.
 

Jeremy P

Well-known member
#9
Yeah not a bug - and honestly a bit of a pain I'd imagine, but it would definitely be nice to see. At the very least clicking tabs should at least append the anchor (ie #info) to the URL since tabs can be linked directly in 1.2+
 

Mike

XenForo developer
Staff member
#10
Nice to see, yes but currently as expected. So moving to suggestions. If there's a (non-archived) version of this, we can merge/dupe this one.