It will not search with handy

Home Forums Product Support Forums Ajax Search Pro for WordPress Support It will not search with handy

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 5 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #11496
    dm9kt
    dm9kt
    Participant

    Hello,

    the search with your plugin work great. only with a handy, like iphone in normal view, the search doesnt work. If i use the Iphone in landscape then it work but in normal handy use there is no function.

    I hope you understand my bad english.

    Thank you,

    Tino

    #11498
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tino,

    It’s happening because the menu creates an exact duplicate clone of the search for the mobile view, as well as other menu elements. Since this “clone” only exists on the DOM tree and not been initialized, it does not work. Even a bigger issue is that the clone has the exact same ID as the original, which is also invalid HTML – and it makes re-initialization almost impossible. This is a very bad practice, I would highly recommend using a menu that does not do the javascript cloning process, but uses CSS media queries instead to show/hide elements.

    As a temporary solution, you can try adding the following code to the functions.php file in your active theme directory:

    This may or may not work, but it’s worth a try. Please note that this is just a temporary workaround, it may not work with future plugin versions.

    Unfortunately there is no global solution I could implement to the plugin in the future to prevent this malfunction, as it’s caused by an undetectable and unexpect cloning process of the menu script.

    Best,
    Ernest Marcinko

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


    #11499
    dm9kt
    dm9kt
    Participant

    Hello Ernest,

    thank you for your reply. Yesterday i have checked it with an other theme and it doesnt work too. Please, can you say me what the Problem is? I mean, is it a wordpress problem or a Plugin Problem or a theme problem. I think, i have understand it is a problem how wordpress uses the mobile Menu. Is this right?

    Thank you,

    tino

    #11500
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi Tino,

    It’s a problem with the menu script, and how it clones the DOM nodes. Menus are usually part of themes, unless you have a separate menu plugin installed. Unfortunately many theme developers use this “clone” method to display menu items. It’s a very comfortable method, but basically prevents placing most 3rd party javascript powered item into the menu (like sliders, control forms, live searches, drop-downs etc..). I believe they don’t expect the customer to place anything fancy there, so I don’t blame them for this.
    You can reach out to the theme developer, but I highly doubt he will be able to do anything with this, as it would require him to completely re-design the menu to not use javascript for cloning the menu elements.

    A good menu example is the twentysixteen default theme menu, which simply moves the elements with CSS styles, without any javascript involved.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.