Hi @bullshmaiser!
No, we still working on it, but can you test my two new solutions?
1st:
add_action( 'wp_footer', function() { ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
var searchIcon = $('.js-dgwt-wcas-search-icon-handler');
var searchInput = $('#dgwt-wcas-search-input-2');
if (searchIcon.length && searchInput.length) {
searchInput.attr('tabindex', '-1');
searchIcon.click(function() {
requestAnimationFrame(function() {
searchInput.focus();
});
});
searchIcon[0].addEventListener('touchstart', function() {
requestAnimationFrame(function() {
searchInput.focus();
});
});
}
});
</script>
<?php }, 9999 );
2nd:
add_action( 'wp_footer', function() { ?>
<script type="text/javascript">
jQuery(document).ready(function($) {
var searchIcon = $('.js-dgwt-wcas-search-icon-handler');
var searchInput = $('#dgwt-wcas-search-input-2');
if (searchIcon.length && searchInput.length) {
searchInput.attr('tabindex', '-1');
function focusInput() {
searchInput.focus();
}
searchIcon.on('click touchstart', function() {
$('.elementor-element-bf5b3a6').addClass('visible');
focusInput();
});
}
});
</script>
<?php }, 9999 );
Please let me know if any of these solutions will work.
Regards,
Kris
-
This reply was modified 4 months ago by Kris.