Keep active tab after browser refresh?

Support MB Tabs Keep active tab after browser refresh?

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #23411
    maybeadevmaybeadev
    Participant

    Hi:

    Is there a way to navigate the user back to their active tab after a browser refresh? Using the SETTINGS add-on a browser page refresh takes you back to the active tab. But that doesn't seem to be an option in the METABOX TABS add-on.

    Thanks!

    #23413
    Long NguyenLong Nguyen
    Moderator

    Hi,

    The extension MB Tabs supports to show the default active tab by using the setting tab_default_active. See more in the documentation https://docs.metabox.io/extensions/meta-box-tabs/#usage

    Do you mean the currently active tab when a user click publish/update the post?

    #23414
    maybeadevmaybeadev
    Participant

    Hi - the second one - whatever tab the user is on when the post is published / updated or the page is simply refreshed using the browser refresh button: is there a way to keep that the active tab afterwards?

    Thanks.

    #23415
    Long NguyenLong Nguyen
    Moderator

    Thanks for your idea.

    I'm going to create a feature request for the developer team to support keep the active tab on refreshing/reloading the page.

    #24094
    maybeadevmaybeadev
    Participant

    Hi - is there a way we can maybe kludge together a fix for this? I doubt that the developers will get to this idea any time soon so maybe there might be a way to implement this with a modicum of JS code?

    Thanks.

    #44195
    Bluemoon75Bluemoon75
    Participant

    Hi Long,

    I see above that you requested a feature for this. As of 2024 I don't see any "Save State" option for the tab. Is this something that might be worked on this year?

    Thanks

    #44196
    maybeadevmaybeadev
    Participant

    @bluemoon75 - maybe try playing with this JS script. You'd have to enqueue it using a custom plugin and maybe tweak it a bit to address the correct css tab references.

    https://gist.github.com/wpcloudpanel/4d6dce54a225f2a6de183841dc1d4534

    #44206
    Bluemoon75Bluemoon75
    Participant

    Hey @elindydotcom,

    Thanks for the script, I'll have a look.

    Cheers~

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.