Close result list when searchfield is empty

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Close result list when searchfield is empty

This topic contains 12 replies, has 2 voices, and was last updated by jokermanu jokermanu 3 years, 7 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #20224
    jokermanu
    jokermanu
    Participant

    Hi and thanks for the great plugin. Just two little questions:

    1. The result list should be closed when searchfield is empty. So, when I’ve typed something and delete everything I’ve typed the result list should close. (image002.png)
    2. When I type a german Umlaut like Ä, Ö, Ü wring results are being shown in result list. (image004.png)

    #20230
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    The screenshots didn’t came through unfortunately. Can you please try uploading them again? thank you!

    Best,
    Ernest Marcinko

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


    #20233
    jokermanu
    jokermanu
    Participant

    Okay, next try.

    Attachments:
    You must be logged in to view attached files.
    #20236
    jokermanu
    jokermanu
    Participant

    And a short Video for the first questions. When all characters are deleted the result list should close.

    #20237
    jokermanu
    jokermanu
    Participant
    You cannot access this content.
    #20246
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you, the images are okay.

    1. There is no option to do that, but it is possible to achieve it via a configuration + custom code combo. First, change this option to above 0.
    Then, add this custom code to the functions.php in your theme/child theme directory (copy from line 3 only!). Before editing, please make sure to have a full site back-up just in case!

    2. I see what you need now. Well, this is more related to your database collation, which is by default case and accent insensitive in WordPress. This is not something I recommend to change.
    There is an option on the plugin back-end, on the Compatibility Settings -> Query compatibiltiy panel, which will try to enforce that. It may not work though, and it may cause some performance setbacks. First try enabling this option, then this one. If none works, then try combined as well.

    Best,
    Ernest Marcinko

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


    #20251
    jokermanu
    jokermanu
    Participant

    Wow, what a fast and great support. Thanks a lot!
    Number two unfortunately doesn’t work. None of them. But I’m pretty happy for the code for number one – works prefect!

    #20254
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #20482
    jokermanu
    jokermanu
    Participant

    Hey again,

    when you type something (f.e.: sdlfgkjh) and then hit backspace the result list hides only if you tap backspace once again when the searchfield is already emtpy. Any chance to fix it that the resultlist hides directly when the search field is empty again?
    please take a look at this site: https://ratundgeber.de/

    thanks a lot.

    #20483
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Try changing the minimal character count to trigger the search to 1 or more, instead of the default 0, here: https://i.imgur.com/tkUsI5X.png
    That should resolve the issue.

    Best,
    Ernest Marcinko

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


    #20486
    jokermanu
    jokermanu
    Participant

    Hi,

    thanks for the very fast reply.
    No, it doesn’t. Now it’s set to “2” and the same problem. When you delete one character after an other it works but when you press backspace til all deleted it doesn’t work.

    #20490
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Yes, indeed, it seems like it’s a timing issue on how the results of a previous query are returned, but the hiding is too late for them.

    I have made a possible change to the custom code, please try this one instead of the previous:

    Best,
    Ernest Marcinko

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


    #20494
    jokermanu
    jokermanu
    Participant

    Yeah, it works. hanks again for the alway great and fast support!

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

The topic ‘Close result list when searchfield is empty’ is closed to new replies.