Scroll Down Disappears - Question | JoomShaper

Scroll Down Disappears

Laurent

Laurent

Helix Framework 1 month ago

Hi,

I have a strange behavior on a website. on menu, when I click here for instance https://prnt.sc/PCFZSXkhxLdR the page scrolls correctly, but vertical scroll on web browser (chrome) disappears.

Any idea why?

live url in Hidden Content area

Thanks L.

0
22 Answers
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #211521

Hello There,

I hope you’re doing well. I’m sorry for the experience you’ve had so far.

To look into this issue more closely, could you please share temporary Super Admin access (inside the hidden content box)? I’ll check this and update you as soon as possible.

Please make sure to keep a full site backup before sharing the credentials, just to be safe.

Best regards,

0
Laurent
Laurent
Accepted Answer
1 month ago #211528

ok done see Hidden Content area

0
Laurent
Laurent
Accepted Answer
1 month ago #211802

any news?

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #212016

Hi,

Please take my apology. I'm trying some custom JS code, but facing some difficulty to add them in your system. Please allow me time.

0
Laurent
Laurent
Accepted Answer
1 month ago #212019

no problem, thank you

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #212156

Hi Laurent,

You are welcome.

Are you using any server side caching, please? I have made some changes, but it is not reflecting. Kindly do let me know.

Thanks!

0
Laurent
Laurent
Accepted Answer
1 month ago #212162

there is a cache plugin installed on joomla.

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #212221

Thanks! Kindly, clear your cache, check and let me know.

0
Laurent
Laurent
Accepted Answer
1 month ago #212229

ok works fine now. what have you done? where was the issue exactly?

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #212253

Thanks for letting me know about the update. I have created and added some code in the custom.js file inside your template.

0
Laurent
Laurent
Accepted Answer
1 month ago #212263

ok but why this problem occured? everything was fine since few months/years. will you merge this fix with next helix update?

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #212277

Not everyone is facing this issue, so I'm unsure about the reason behind this. Really sorry about that.

0
Laurent
Laurent
Accepted Answer
1 month ago #212301

ok thanks. about custom.js you have added, this file is loaded automatically by helix or you have added some code somewhere to load it?

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #212386

Hi,

You are always welcome:)

By default this file doesn’t exist, I have created the custom.js file inside your template, then put the code. The following documentation may help:

https://www.joomshaper.com/documentation/helix-framework/custom-code-css-js-meta#custom-code-by-files

Best regards,

0
Laurent
Laurent
Accepted Answer
1 month ago #212388

ok thanks

0
Laurent
Laurent
Accepted Answer
1 month ago #213307

hi,

I have applied the fix you did on my website to another website, but I still have the issue.

I have created this js file /templates/shaper_helixultimate/js/custom.js and inside I have added this code :

jQuery(function($) {
    $('.close-offcanvas, .offcanvas-overlay, .offcanvas-inner ul > li:not(.no-scroll) > a')
        .on('click', function() {
            $('body').removeClass('offcanvas-active');
        });

    $(document).on('click', '.offcanvas-menu a', function (event) {
        var href = $(this).attr('href');
        if ($(this).hasClass('close-offcanvas') || $(this).hasClass('no-close-offcanvas')) {
            return;
        }
        if (href && href.indexOf('#') === 0 && href.length > 1) { 
            setTimeout(function() {
                closeOffcanvas();
            }, 150);
        }
        else if (href && href.indexOf('#') > -1 && !href.match(/^https?:\/\//)) {
            var hashIndex = href.indexOf('#');
            var currentPath = window.location.pathname;
            var linkPath = href.substring(0, hashIndex) || currentPath;

            if (linkPath === currentPath || linkPath === '' || linkPath === '/') {
                setTimeout(function() {
                    closeOffcanvas();
                }, 150);
            }
        }
    });

    $(window).on('hashchange', function() {
        if ($('.offcanvas-init').hasClass('offcanvas-active')) {
            closeOffcanvas();
        }
    });

});

but same problem : vertical scroll on web browser (chrome) disappears when an item menu is clicked. see Hidden Content area for website link.

any idea why?

Thanks L

0
Laurent
Laurent
Accepted Answer
1 month ago #213591

problem solved. corrected code below

jQuery(function($) {

    function forceCloseOffcanvas() {

        $('.offcanvas-init').removeClass('offcanvas-active full-offcanvas');
        $('body').css('overflow', '');

        $('.offcanvas-menu')
            .attr('inert', '')
            .attr('tabindex', '-1');

        $(document).off('keydown.offcanvas');
    }

    $('.close-offcanvas, .offcanvas-overlay, .offcanvas-inner ul > li:not(.no-scroll) > a')
        .on('click', function() {
            forceCloseOffcanvas();
        });

    $(document).on('click', '.offcanvas-menu a', function () {

        var href = $(this).attr('href');

        if ($(this).hasClass('close-offcanvas') || $(this).hasClass('no-close-offcanvas')) {
            return;
        }

        if (href && href.indexOf('#') === 0 && href.length > 1) {
            setTimeout(forceCloseOffcanvas, 150);
        }
        else if (href && href.indexOf('#') > -1 && !href.match(/^https?:\/\//)) {

            var hashIndex = href.indexOf('#');
            var currentPath = window.location.pathname;
            var linkPath = href.substring(0, hashIndex) || currentPath;

            if (linkPath === currentPath || linkPath === '' || linkPath === '/') {
                setTimeout(forceCloseOffcanvas, 150);
            }
        }
    });

    $(window).on('hashchange', function() {
        if ($('.offcanvas-init').hasClass('offcanvas-active')) {
            forceCloseOffcanvas();
        }
    });

});
0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #213348

Hi,

Are you facing this issue on mobile devices with offcanvas menu?

Kindly share your admin access to check.

0
Laurent
Laurent
Accepted Answer
1 month ago #213358

both : PC + mobile. see Hidden Content area for credentials

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #213490

Hi,

Thanks for the credentials.

On desktop/laptop, it looks fine on my end. Please make sure all caches are cleared, including both Joomla and any server-side caching, if you are using them.

0
Laurent
Laurent
Accepted Answer
1 month ago #213494

Already done, same problem. I'm sorry but does not work. Do this

0
Rashida Rahman
Rashida Rahman
Accepted Answer
Support Agent 1 month ago #213645

Thanks for the update and glad that you have succeeded to resolve that.

Best regards,

0