Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Close result list when searchfield is empty
- This topic has 12 replies, 2 voices, and was last updated 7 years, 5 months ago by
jokermanu.
-
AuthorPosts
-
December 3, 2018 at 10:55 am #20224
jokermanu
ParticipantHi 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)December 3, 2018 at 12:12 pm #20230Ernest Marcinko
KeymasterHi,
The screenshots didn’t came through unfortunately. Can you please try uploading them again? thank you!
December 3, 2018 at 2:17 pm #20233jokermanu
ParticipantOkay, next try.
December 3, 2018 at 2:21 pm #20236jokermanu
ParticipantAnd a short Video for the first questions. When all characters are deleted the result list should close.
December 3, 2018 at 2:23 pm #20237jokermanu
ParticipantYou cannot access this content.
December 3, 2018 at 5:09 pm #20246Ernest Marcinko
KeymasterHi,
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.December 3, 2018 at 8:21 pm #20251jokermanu
ParticipantWow, 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!December 4, 2018 at 10:05 am #20254Ernest Marcinko
KeymasterYou cannot access this content.
December 19, 2018 at 1:01 pm #20482jokermanu
ParticipantHey 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.
December 19, 2018 at 1:04 pm #20483Ernest Marcinko
KeymasterHi,
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.December 19, 2018 at 1:13 pm #20486jokermanu
ParticipantHi,
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.December 19, 2018 at 1:40 pm #20490Ernest Marcinko
KeymasterYes, 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:
December 19, 2018 at 2:42 pm #20494jokermanu
ParticipantYeah, it works. hanks again for the alway great and fast support!
-
AuthorPosts
- The topic ‘Close result list when searchfield is empty’ is closed to new replies.