Open manicko opened 11 years ago
@manicko I'm seeing this behaviour too. Did you, or anyone discover a solution?
Update: Is this by design? Noticed on the simple test demo page (http://www.revo.wangba.fr/simple-test-ajax.html) leaving the search box empty and clicking 'Search' the results show all site pages. I'm seeing the same on my installation with &livesearch='0' and a null search term.
Attempted for a few hours to disable this behaviour in advsearch.class.php but my head is spinning now ;)
Any help greatly appreciated!
Latest: After hours of looking through the code, discovered this hack to stop the livesearch results showing all site pages if the search box is empty ( ie, the prior search term has been deleted )
In assets/components/advsearch/js/advsearch.min.js delete &&st.length!=0
in the if statement on line 54
Hoping this helps you too.
do you mind to show me that line in here? https://github.com/Coroico/AdvSearch/blob/Development/assets/components/advsearch/js/advsearch.js
Looks like line 204:
if (as.si.length && (st.length !== 0) && as.ls && (st.length < as.mc)) {
suggest changing this to:
if (as.si.length && as.ls && (st.length < as.mc)) {
Have not tested. Maybe you can post back once you've tested? Good luck!
if starts to fill in the search form with text (in ajax mode with livesearch) wait till the first results appear then delete the text using backspace the search will show all site pages as a result