This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Reply To: ios mobile search problem

#30991
Ernest MarcinkoErnest Marcinko
Keymaster

I’m sorry I phrased it incorrectly, by pop-up I meant the drop-down menu script. The search does not control how the navigation works, nor it opens/closes it in any way, it cannot do that.
For testing, I placed an empty input container to the script to make sure there is no conflict, and it looks like the menu script is automatically closing whenever an input field is clicled or gets focused on IOS mobile devices. I’m very sorry, but I don’t know why the menu is doing that, but the issue not related to the search plugin, as it is happening with a completely unrelated empty input field as well.

You can try custom scripts to perhaps prevent event propagation and default handles, but I am not sure if they will work.

add_action('wp_footer', 'asp_add_menu_stop_focus_trigger');
function asp_add_menu_stop_focus_trigger() {
  ?>
  <script>
	jQuery(function($){
		$('input.orig').on('click touchend focus', function(e){
			e.preventDefault();
			e.stopPropagation();
		});
	});
  </script>
  <?php
}

Try adding this custom code to the functions.php in your theme/child theme directory. Before editing, please make sure to have a full site back-up just in case!

Please note that this issue is unrelated to the plugin, so I cannot guarantee any solution. You might have to ask the navigation menu developers about the input focus closing issue.