Lay Theme Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    History back doesn't work when used Hashes / Anchor / history push state

    Bug Reports
    3
    5
    569
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • C
      clemens last edited by

      Hi Armin,
      I'm building a website with your theme right now. Instead of FullPageJS I intentionally used scrollify JS to jump from section to section. This generates hashes, which I use for navigation reasons.

      The problem is, when I leave the main page with the sections and navigation logic in order to go to some project, I can't go back in history. I have to disable the hash functionality of the plugin to make history.pushState() work properly. How can I solve this problem? The navigation within the projets works properly.

      A minor problem is, that the main page can't be opened smoothly with this code pattern:
      eg.: data-id="25" data-title="Studio" data-type="page".
      I need a full refresh of the page. Does it have to do with the video background or something?

      1 Reply Last reply Reply Quote 0
      • mariusjopen
        mariusjopen Global Moderator last edited by

        Hey Clemens!

        Can you post a link to your website that we can have a look?

        All the best!

        Marius

        www.mariusjopen.world

        1 Reply Last reply Reply Quote 0
        • C
          clemens last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • T
            Théo Viardin last edited by

            Hello Armin / Marius,

            I don't know how this story ended, but I got quiet the same problem with a website I am working on. I am not a developper and I only got some notions in HTML/CSS/JS, so i'll try my best to explain.

            I created a fixed button on the top of my homepage, wich leads to an anchor lower down the page. First things, depending from where the link is clicked, it add /#nameofmyanchor or only #nameofmyanchor. I don't get why does it leads to 2 differents URL

            Then when I go to some other page on the site and I come back to the home page with the browser previous buttons, it leads to the same page i'm on with #nameofmyanchor at the end of url (forexemple works/#nameofmyanchor instead of home/#nameofmyanchor).
            I have to click a second time on the browser previous button to go on the right page.

            Is there a solution to this issue ?

            Thanks a lot for your attention :),
            Théo

            1 Reply Last reply Reply Quote 0
            • mariusjopen
              mariusjopen Global Moderator last edited by

              Hi @Théo-Viardin !

              Can you post a link?

              Keep in mind that LayTheme is coded as a single javascript application.
              That means the back button in the browser really goes back in history. And the last thing in history is the anchor.

              Let me know when you have uploaded the page.

              Best!

              Marius

              www.mariusjopen.world

              1 Reply Last reply Reply Quote 0
              • First post
                Last post

              I don't answer or check forum DMs, please just post on the forum.

              Try this to fix issues before you post:

              Use the Search Feature. Maybe there is already a solution to your issue.

              1. Update Lay Theme and all Lay Theme Addons
              2. Disable all Plugins
              3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
              4. Now see if your problem solved itself
              5. Go here, see if your problem is listed here:
              Troubleshooting

              When you post:
              1. Post a link to where the problem is
              2. If the problem is difficult to explain, post screenshots / link to a video to explain it

              Thanks!

              Online Users

              I

              Recent Topics

              • M

                Tag filter / Maximum width

              • open all links in a thumbnail grid in a new tab

              • text underline

              • centred Carousel fixed width and proportions

              laytheme.com