• Resolved Bolo1331

    (@crisbrand)


    Hi,
    I had an error with Elementor’s sticky menu.
    The problem was that when I was scrolling through the menu on my smartphone, it automatically blocked the X button to close the menu and I couldn’t expand the submenu. I looked for a solution on the support website but didn’t find it. I decided to test the solutions and it turns out that adding this simple js code:

    The problem occurs with scrolling, so to eliminate the bug I blocked the ability to scroll when the menu is open, when you close it you can continue scrolling the page (body).

    <script>
    document.addEventListener('DOMContentLoaded', function() {
        const mobileMenu = document.querySelector('.htmobile-menu-wrap');
    
        // Funkcja do blokowania scrollowania
        function blockScroll() {
            document.body.style.overflow = 'hidden';
        }
    
        // Funkcja do odblokowywania scrollowania
        function allowScroll() {
            document.body.style.overflow = '';
        }
    
        // Obserwator zmian w klasach elementu
        const observer = new MutationObserver(function(mutations) {
            mutations.forEach(function(mutation) {
                if (mutation.attributeName === 'class') {
                    const hasInsideClass = mobileMenu.classList.contains('inside');
                    if (hasInsideClass) {
                        blockScroll();
                    } else {
                        allowScroll();
                    }
                }
            });
        });
    
        // Konfiguracja obserwatora
        observer.observe(mobileMenu, { attributes: true });
    
        // Sprawdzenie na starcie, czy element ma klas? inside
        if (mobileMenu.classList.contains('inside')) {
            blockScroll();
        }
    });
    </script>
    
    • This topic was modified 6 months, 1 week ago by Bolo1331.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Tarek Aziz

    (@tarekht)

    Hi @crisbrand,

    Thank you for informing us about the issue you encountered with Elementor’s sticky menu.

    I am sorry to hear about the trouble you experienced, and it’s great to hear that you have managed to find a temporary solution ??

    However, after reviewing the message you shared above, we have thoroughly analyzed our plugin to identify the issue.

    But, we could not replicate the same issue on our end. Could you please create a ticket in our dedicated support center?

    This will help us investigate the issue further and figure out the root cause of it while offering you an effective solution.

    Looking forward to your valuable response and wishing you a wonderful day ahead!

    Kind regards,
    Taek Aziz

    Plugin Contributor HT Plugins

    (@htplugins)

    Hello there,
    We hope this message finds you well ??
    It’s been a while since we last heard from you. We assume you have already managed to resolve the issue.
    Therefore, we would like to mark the thread as “Resolved” for now.
    If you have any questions or need further assistance, please don’t hesitate to reach out.
    We are always happy to help.

    Wishing you a productive week ahead!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.