Hey @eljkmw,
Thanks for posting!
Can you send us a note via the form below(General Inquiry) and we’ll take it from there? 🙂
https://www.wpbeaverbuilder.com/contact/
You can include a link to this thread so we can keep it updated, and you don’t have to repeat the issue.
Ben
@hinampaksh,
I managed to figure it out. Please ignore my submitted General Inquiry, which I recently sent.
The following is what I implemented to my “custom.js” within my active child theme.
jQuery(document).ready(function($) {
/* Prevents mobile menu from closing when input search is focused */
document.getElementById('menu-item-search').addEventListener('click', function(e) {
e.stopPropagation();
});
});
The ‘menu-item-search’ ID was previously inserted through functions.php, using the snippets below.
// Add Search via shortcode
function bb_search_shortcode() {
ob_start();
FLTheme::nav_search();
return ob_get_clean();
}
add_shortcode( 'bb_search', 'bb_search_shortcode' );
// Add Search shortcode to Primary Menu
function bb_add_search_to_primary_menu( $nav, $args ) {
if ( $args->menu == 'primary' ) {
$nav .= '<li id="menu-item-search" class="menu-item">' . do_shortcode( '[bb_search]' ) . '</li>';
}
return $nav;
}
add_filter( 'wp_nav_menu_items', 'bb_add_search_to_primary_menu', 10, 2 );
I hope this may help someone else. v(^^)v
Glad to hear that, @eljkmw! And thanks for taking the time to inform us. 🙂
Have fun with BB!
Ben