I see. That’s the default behavior, and you’ll need custom code to achieve as such.
You can try creating a Hook Element hooked to wp_footer
and displayed to the Entire site with this code:
<script>
var myanchor = document.querySelectorAll( '.slideout-navigation .my-anchor-button' );
var YourOffsideCloseAction = function() {
var url = this.getAttribute( 'href' );
if ( '#' !== url && '' !== url && ! navigator.userAgent.match( /iemobile/i ) ) {
setTimeout( function() {
generateOffside.close();
}, 200 );
}
};
for ( var i = 0; i < myanchor.length; i++ ) {
myanchor[i].addEventListener( 'click', YourOffsideCloseAction, false );
};
</script>
Hope this helps! 🙂