Okay
  Public Ticket #2529969
Lightbox Navigation
Closed

Comments

  •  7
    Siddho started the conversation

    Hello,

    I have a question about browser navigation after closing a portfolio lightbox.

    Here is the procedure described in steps:

    - I look at the main page on my website and then navigate to another page.
    - On this new page I click on an image which opens a lighbox portfolio.
    - Then I look through several images in that lightbox portfolio.
    - When I close the lightbox I am then back on the page from where I came to this lightbox.
    - But when I hit my browser's back button to go back to the main page of my site I notice that it still remains on the page where I was and that the address bar toggles through all the single lightbox images which I looked at until it eventualy and finally gets back to the main page where I expected to land with the first browser back click!

    This is very unintuitive and makes many people think that the website navigation is somehow broken.

    Is there anyway to fix this?

    You dont need to look at my site to see this behaviour. This also happens for example in your own Kalium Photography demo site (I'M REMI). Just navigate through any of the lightboxes and then close that lightbox and you will see that you cannot go back to the previous page using your browsers back-button once. You have to click back through all the loaded addresses before you finally get back to where you want to be.

    Please help.

    Many thanks.

  •  1,069
    Art replied

    Hi Siddho,

    I understand your concern, I will assign this ticket to our developer and he will look more deeply into this and give you a proper answer. It may take more time than usual.

  •  7
    Siddho replied

    No worries, Art.

    I am happy to wait if a solution can be found.

    Cheers.

  •  553
    Arlind replied

    Hi Siddho,

    I have addressed this issue and fixed it. In the next release it will be available:

    https://d.pr/v/6YxrvF

    Kind regards,
    Arlind


      Documentation         Join Kalium Users Group

  •  7
    Siddho replied

    Hi Arlind,

    Many thanks for your reply.

    Looking at your link and animation I think there might be a misunderstanding:

    My intention was as follows:

    - Start on page 1.
    - Navigate from page 1 to page 2.
    - On page 2 open a lightbox and click through some images.
    - Close the lightbox and then I am naturally still on page 2.
    - Click the browser's back button and land back on page 1.

    This is how all other lightboxes which I have seen on numerous websites work and that is what visitors to my site expect.

    They way it functions now is as I have described before (see previous messages).

    The way your animation shows it now is, if I have understood it right, as follows:
    After closing the lightbox on page 2 when I click my browser's back button the lightbox loads again and I go back through all the images just seen backwards until finally I land on page 1!!
    I just want to go directly back to page 1!! I have closed the lightbox with the intention of navigating back in my browser and going somewhere else.
    Why would I want to look through the lightbox images again backwards before finally getting to page 1??? I would just like to land back on page 1 and go from there.

    Please let me know what you think.

    Many thanks again.

  •  553
    Arlind replied

    Hi Siddho,

    Aha, I understand the point here. Really sorry because I thought what you said was implemented however I misunderstood the way of how this should work.

    So this should be implemented with "replaceState" (a dev term) and not "pushState" which I am currently doing right now.

    I have added this issue in our improvements todo list and will try to implement it in the next release.

    When I finish it, I'll send you the file directly to let you use the fix sooner.

    Kind regards,
    Arlind


      Documentation         Join Kalium Users Group

  •  553
    Arlind replied

    Hello again,

    I have implemented this change, can you please try to replace the JS file in your site and see how it works for you:

    Download this file, extract and replace the JS file in this directory (of the theme): /assets/js

    If you don't see the change immediately, please hard-refresh your browser (CTRL/CMD+R) because it takes longer to load the changes, as they are saved in browser cache. Another option is to open new private/incognito window and try if it works.

    Kind regards,
    Arlind


      Documentation         Join Kalium Users Group

  •  7
    Siddho replied

    Hi Arlind,

    Wonderful!
    The new JS file has done the trick and now navigation is as expected.

    Many thanks for sorting this out so quickly. Much appreciated.

    Cheers,

    Siddho

  •  553
    Arlind replied

    Hi Siddho,

    Happy to hear that this is now fixed, we will also include this fix in the next theme updatesmile.png

    I wish you all the best.

    Have a nice day!

    Kind regards,
    Arlind


      Documentation         Join Kalium Users Group