Okay
  Public Ticket #1546234
Back button doesn't trigger portfolio page reload but returns a preloader black screen
Closed

Comments

  • Markus started the conversation

    Dear ClaPat team,

    First of all: congratulations to the great theme. However, it seems to have an issue with the back button functionality.

    Reproduction:

    Safari on Desktop (Version 11.0.3) and Mobile (iOS Version 11.2.6)

    1. Open http://clapat.ro/themes/maestro-wordpress/maestro_portfolio/ellie-cashman/

    2. Scroll down to the bottom of the page and click on "next"

    3. Wait until the new page has loaded

    4. Click on the back button of the browser


    Actual result: The previous page doesn't get loaded but the user is stuck on the black preloader page

    Expected result: The previous page should get loaded instantly

    I found this ticket that refers to the same issue: https://clapat.ticksy.com//article/4883/

    As recommended, I've added

    jQuery(window).unload(function(){});

    to /js/scripts.js at line 6.

    As shown in my attachment, I've also tried

    $(window).unload(function(){});

    Unfortunately, neither of these options worked and I'm still having the same issue.

    Thank you for your support!

  •  1,974
    Support replied

    Hi Markus 

    Can you provide wp admin access to your site (admin url, username and password) to check the code?

    The credentials should be in a private comment.

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  •   Markus replied privately
  •  1,974
    Support replied

    Fixed, commented lines 53 and 54

    //$(".page-overlay").addClass("from-bottom");
    //$('#main').addClass('hidden');

    in /js/scripts.js


    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  •   Markus replied privately
  •  1,974
    Support replied

    Hi Markus

    You are right, I had also to comment these lines 49-50

    //$('#main').addClass('hidden');
    //$('header').addClass('menu-open');

    I'm testing on my ipad's Safari and everything works fine, back button. Make sure you refresh the cache.

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  • Markus replied

    Great, the back button loads the previous page now. However, the previous page is then shown at the very bottom which isn't user friendly (attachment). Can you please fix this behavior so that the user sees the top of the previous page after clicking the back button? Thank you in advance!

  •  1,974
    Support replied

    I tried to scroll up to the top with 

    $('html, body').animate({ scrollTop: 0 }, 1);

    before going to the next portfolio item.

    Looks like one of the Safari's limitations here.

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy

  • Markus replied

    It works fine on desktop now. Unfortunately, not yet on mobile. Is there any workaround?

  •  1,974
    Support replied

    Not that I'm aware of in case of Safari mobile. You have also the scroll to top button which helps the user navigating back to top.

    Thank you.

    Clapat Support

    https://www.clapat.com/

    Review Envato Item Support Policy