1. 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

Discussion in 'Closed Suggestions' started by xf_phantom, Jun 27, 2013.

  1. xf_phantom

    xf_phantom Well-Known Member

    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.

    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
  2. Jeremy

    Jeremy Well-Known Member

    Is this a suggestion or a bug?
  3. James

    James Well-Known Member

    A bug, apparently, because it's a huge pain.

    It's not a "bug" because it's as designed. The suggestion exists already though.
  4. Chris D

    Chris D XenForo Developer Staff Member

    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.
  5. James

    James Well-Known Member

    Can't you use history.pushState()?
    Chris D likes this.
  6. Chris D

    Chris D XenForo Developer Staff Member

    Seems so. Didn't know about it :)
    James likes this.
  7. xf_phantom

    xf_phantom Well-Known Member

  8. James

    James Well-Known Member

    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.
  9. Jeremy P

    Jeremy P Well-Known Member

    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+
  10. Mike

    Mike XenForo Developer Staff Member

    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.
    James likes this.

Share This Page