• Resolved mezzomedia

    (@mezzomedia)


    Hello ARI support,

    With the PRO version of ARI Fancy Lightbox it’s possible to enable deep linking.

    When deep linking is enabled, after opening the fancybox and presssing the browser Back button, it goes to the previous page instead of closing the fancybox and showing the current page where the fancybox was opened.

    How can the PRO version with deeplinking work correctly with the browser Back button?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter mezzomedia

    (@mezzomedia)

    It has been over 2 weeks without any reply.
    The ARI support forum seems to have been removed.

    Where can paying users get support for this plugin? ??

    Plugin Author arisoft

    (@arisoft)

    Hi

    Could you check a reply on our support forum? It is not possible to open the provided link.

    Thread Starter mezzomedia

    (@mezzomedia)

    ARI support provided the following solution:

    Try to populate “Custom JS code” parameter on “ARI Fancy Lightbox -> Settings -> Advanced” page with the following code:

    Code:

    
    if ('scrollRestoration' in history) {
        history.scrollRestoration = 'manual';
    }
    if (!history.state || !history.state.fakeLightbox || history.state.path !== window.location.pathname) {
        history.pushState({fakeLightbox: true, path: window.location.pathname}, null, window.location.pathname);
    }
    window.addEventListener('popstate', function(e) {
        var isActive = !!$.fancybox.getInstance();
        if (isActive) {
            history.pushState({fakeLightbox: true, path: window.location.pathname}, null, window.location.pathname);
            $.fancybox.close();
        } else {
            history.go(-1);
        }
    });
    
Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Back button on Deeplink goes to previous page’ is closed to new replies.