To implement this, I have add a small script in this path: /templates/shaper_onepage/js/custom.js
Code:
jQuery(document).ready(function ($) {
const $offcanvasMenu = $(".offcanvas-menu .mod-menu"); // match your actual menu class
if (!$offcanvasMenu.length) {
return; // Off-canvas menu not found, exit
}
$offcanvasMenu.onePageNav({
currentClass: "active",
changeHash: false,
scrollSpeed: 400,
scrollThreshold: 0.5,
filter: ":not(.no-scroll)",
begin: function () {
if ($(".offcanvas-init").hasClass("offcanvas-active")) {
$(".close-offcanvas").trigger("click"); // Close off-canvas menu
}
}
});
});
Please, check now.
Thanks