Search experience on mobile

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search experience on mobile

This topic contains 4 replies, has 2 voices, and was last updated by

1 year, 3 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • #29558



    Please take a look at this quick video RE search experience on mobile:




    Thank you for the detailed video.

    I’m afraid I might not be able to help with this, as unfortunately this is not caused by the plugin. The menu closes automatically, whenever a menu element is clicked, I guess it is an expected behavior. Instead of trying to resolve this via a custom code, first I recommend checking the menu configuration, if there is any option to change to not the close the menu, unless it looses focus, or the user clicks the menu icon again. That would easily resolve this.

    I tried to look into a possible custom script, but I cant seem to find which event triggers the menu closing unfortunately. While it is beyond our support, if you happen to know which event might be triggering that (in programmatical terms), then I might be able to suggest something.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)



    While I do understand that, please also note that I am not using a menu plugin on mobile.

    This is stock standard WordPress submenus?

    If you say that there is no solution for this, then your documentation/sales page needs to specifically say something like:

    “Please note that you cannot use this search with the default mobile submenu on WordPress”.

    I am not happy with this as a resolution, and implore you to figure out something for both myself and future customers. This has basically enough for the client to remove this plugin and look elsewhere.



    This issue is not generic at all, not standard stock menus (in terms of the additional scripts and styling) – normally, menus does not do this for this exact reason (to prevent issues with other interactive events). Therefore there is no generic solution I can implement to prevent a behavior that should not happen in the first place. Fiddling with other code event handlers will cause more issues only. Programmers cannot think of everything. I am sure, that the menu coder had a good reason to code this behavior – however it prevents combining other interactive items to the menu – which is definitely not promised by them either.

    We can try an approach to remove all of the touch and click handlers from the menu, and hope that it prevents the closing. 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!

    add_action('wp_footer', 'asp_remove_menu_closing');
    function asp_remove_menu_closing() {
    		$(', a').off('touchend').off('touchstart').off('click');

    There is a tiny chance that this may actually work, but may also cause some unexpected behavior, so make sure to test it.

    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)



    Hi Ernest,

    I see, that makes sense, and I agree with you.

    It must be the theme then that is making some sort of interaction with the menu, I was simply saying that we don’t have a menu plugin installed.

    Thanks for the code, I will give it a try.


    P.S: I will also look for a way to isolate that jquery to just the menu subID

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.