Skip to content
  • Recent
  • Tags
  • Popular
  • Users
  • Search
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse

Lay Theme Forum

  1. Home
  2. Bug Reports
  3. History back doesn't work when used Hashes / Anchor / history push state

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

Scheduled Pinned Locked Moved Bug Reports
5 Posts 3 Posters 800 Views
  • 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 Offline
    C Offline
    clemens
    wrote on last edited by
    #1

    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
    0
    • mariusjopenM Offline
      mariusjopenM Offline
      mariusjopen
      Global Moderator
      wrote on last edited by
      #2

      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
      0
      • C Offline
        C Offline
        clemens
        wrote on last edited by
        #3
        This post is deleted!
        1 Reply Last reply
        0
        • T Offline
          T Offline
          Théo Viardin
          wrote on last edited by
          #4

          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
          0
          • mariusjopenM Offline
            mariusjopenM Offline
            mariusjopen
            Global Moderator
            wrote on last edited by
            #5

            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
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            I also code custom websites or custom Lay features.
            💿 Email me here: 💿
            info@laytheme.com

            Before you post:
            1. When using a WordPress Cache plugin, disable it or clear your cache.
            2. Update Lay Theme and all Lay Theme Addons
            3. Disable all Plugins
            4. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"

            This often solves issues you might run into

            When you post:
            1. Post a link to where the problem is
            2. Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
            3. If the problem is difficult to explain, post screenshots / link to a video to explain it
            Online Users
            dafvD
            dafv
            Forgot your key, lost your files, need a previous Lay Theme or Addon version? Go to www.laykeymanager.com
            laytheme.com
            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Recent
            • Tags
            • Popular
            • Users
            • Search