Search not responding on mobile

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search not responding on mobile

This topic contains 8 replies, has 2 voices, and was last updated by tjldesigns tjldesigns 1 year, 9 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #37946
    tjldesigns
    tjldesigns
    Participant

    Hi Ernest,

    I hope you are well, long time no speak :).

    I have an odd one, can you see on the mobile search, if you open the menu, it doesn’t respond?

    Thank you as always for your help,
    Tonya

    #37969
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tonya,

    I am fine, I hope you are too 🙂

    First, try switching these options:
    1. Change the script to the minified source: https://i.imgur.com/gAYPPXi.png
    2. ..as well as the auto init: https://i.imgur.com/OntCvjV.png
    Clear your site and browser cache, and then if all goes well, it should do the trick.

    Best,
    Ernest Marcinko

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


    #37971
    tjldesigns
    tjldesigns
    Participant
    You cannot access this content.
    #37972
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tonya,

    Thank you!

    I just noticed from the source, that the output of the search is not correct at all. I have found that in the theme main.js file there are multiple lines of code tempering with the search output – moving the elements and such. That is causing the issues unfortuantely.
    I do not recommend tempering with the search output via javascript, I can not guarantee support for that.

    Instead of making copies of the search code via javascript, I strongly recommend doing that via the theme files instead, putting the shortcode to the preferred locations. That will not temper with the output, and will be compatible with future releases as well.

    Best,
    Ernest Marcinko

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


    #37973
    tjldesigns
    tjldesigns
    Participant
    You cannot access this content.
    #37986
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    I understand.

    The copy script is simply copying the wrong element there, and this method may actually make a worse score, as printing the search bar twice.
    Once the search element is moved, the plugin has to try to detect and re-initialize it, and that unneccessary extra work. Moving 3rd DOM nodes via javascript is a very bad practice, as it detaches event listeners from the origin element as well.

    If you decide to keep this method, I would advise to move the search into a container element of your own, and move that element instead. That will keep your code functional, even if we make a minor change to the search output.
    Your method was probably working for an earlier version of the plugin.

    Best,
    Ernest Marcinko

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


    #38001
    tjldesigns
    tjldesigns
    Participant

    Hello again Ernest,

    Thanks ever so much again for your feedback, it’s really helpful.

    I didn’t code the front-end of this site, but I have relayed your feedback for future, just around moving the structures via js not being advisable for elements such as this.

    For now, I have however added a wrapping structure as you suggested, and moved that instead, and that is now working nicely so at least that is resolved.

    Many thanks again and have a lovely weekend :),
    Tonya

    #38009
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    You are very welcome Tonya 🙂

    That should actually do the trick for any future releases.

    Best,
    Ernest Marcinko

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


    #38015
    tjldesigns
    tjldesigns
    Participant

    Thanks so much again Ernest, your quick and brilliant help is always so much appreciated :).

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

You must be logged in to reply to this topic.