Hi @mrobm
Here is a code snippet that will remove focus from FiboSearch input when the popup is shown and the device is mobile (screen width less than 992px).
You need to check and change the ID from 102 to your popup ID in the below code. ID can be found in WP Admin -> Templates -> Popup in shortcode.
// Remove FiboSearch focus on input after Elementor Popup Show event
add_action( 'wp_footer', function() { ?>
<script type="text/javascript">
jQuery( document ).on( 'elementor/popup/show', ( event, id, instance ) => {
var isMobile = jQuery(window).width() <= 992;
if ( id === 102 && isMobile ) {
jQuery('.js-dgwt-wcas-enable-mobile-form').trigger('click');
setTimeout(function() {
jQuery('.dgwt-wcas-search-input').blur();
}, 100);
}
} );
</script>
<?php }, 9999 );de.
You have two ways to add this code to your theme:
- Open the
functions.php
in your child theme and add the code at the end.
- or install the Code Snippets plugin and apply this code as a snippet.
Regards,
Kris