Anchor links are not working correctly on mobile in Off-canvas menu - Forum | JoomShaper
Solved Helix Framework

Anchor links are not working correctly on mobile in Off-canvas menu

Asked by Kugata 10 months ago Last activity 9 months ago

Hello!
Anchor links are not working correctly only on mobile

  1. When clicking on the anchor link "bureau" (https://adrd.pro/en/#team) from homepage, the Off-canvas menu window does not close. Because it's in a div container class="offcanvas-menu border-menu" tabindex does not switch to value -1.
  2. When clicking on the anchor link "bureau" (https://adrd.pro/en/#team) from any other page, the Off-canvas menu window closes, but the transition does not occur to the anchor position, and the page scrolls to the bottom.
    This only happens on mobile phone.
    What could be the reason and how can it be fixed?

Accepted answer

Marked as the solution
Rashida Rahman Staff

Hi,

Thanks for the update and for the information.

Glad that your issue is now solved:)

You may accept the most useful answer in order to close the post.

Have a nice day!

7 more replies

Rashida Rahman Staff

Hello,

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

I got the first issue, but the second one is looking fine at my end. How did you added URL in your anchor menu? Did you put just the section ID or the full url?

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,

Kugata Asked this

Hello, Rashida!
I tried adding URL in different ways, but the result was the same.
I hope you can help me.
Thank you in advance.

Kugata Asked this

Hello, Rashida!
Both problems still exist.

Rashida Rahman Staff

Hi,

Sorry for the unwanted delay. Would you please check now and let me know if the issue is now solved or not at your end? Though I didn't get the second issue.

Best regards,

Kugata Asked this

Hi, Rashida!
Everything works great now. Thanks for the quick help! You're the best!

Rashida Rahman Staff

Hello,

Glad to know that the issue is now solved already:) You are always welcome and thanks for accepting the answer.

Have a nice day!

Kugata Asked this
10 months ago · edited

Rashida, after your fixes, another problem appeared -
on the mobile version, if you're on the homepage and click the "BUREAU" anchor link, the scroll stops working. This doesn't happen on other pages.
After adding the code

document.body.style.overflow = 'auto';

to the custom.js file, everything started working without problems.

Rashida Rahman Staff

Hi,

I can not login to your admin area anymore...

Kugata Asked this
10 months ago · edited

Thank you, Rashida. I solved this problem myself. I added the code: document.body.style.overflow = 'auto'; to the custom.js file.
`

jQuery(function($) {

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

    $('body').removeClass('offcanvas-active');

    document.body.style.overflow = 'auto';

});

});

`

Rashida Rahman Staff

Thanks for accepting the answer:)

Have a nice day!

Log in to reply.