[BUGFIX] Continue searching after empty result 32/49532/3
authorAlexander Jahn <jahn.typo3@googlemail.com>
Mon, 22 Aug 2016 07:09:00 +0000 (09:09 +0200)
committerGeorg Ringer <georg.ringer@gmail.com>
Tue, 23 Aug 2016 07:54:37 +0000 (09:54 +0200)
Change the default behaviour of jQuery autocomplete to continue
searching for characters even if the search already returned nothing.

The standard behaviour of autocomplete is to stop searching after
no results were found.
However, this made it impossible to use commands.
Searching for '#content:12345' did not work when '#con' could not
be found. Search was not executed for subsequent characters.

The parameter 'preventBadQueries: false' is used to force
searching for every character entered.

Resolves: #77566
Releases: master, 7.6
Change-Id: I423df51ae34ae258c42a418040d24cd91886872a
Reviewed-on: https://review.typo3.org/49532
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
Tested-by: Bamboo TYPO3com <info@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>

index b6ca661..c7f2cf7 100644 (file)
@@ -39,6 +39,7 @@ define(['jquery', 'jquery/autocomplete', 'TYPO3/CMS/Backend/jquery.clearable'],
                        preserveInput: true,
                        showNoSuggestionNotice: true,
                        triggerSelectOnValidInput: false,
+                       preventBadQueries: false,
                        noSuggestionNotice: '<div class="dropdown-info">' + TYPO3.LLL.liveSearch.listEmptyText + '</div>'
                                        + '<div class="search-list-help-content"><strong>' + TYPO3.LLL.liveSearch.helpTitle + '</strong>'
                                        + '<p>' + TYPO3.LLL.liveSearch.helpDescription + '<br>' + TYPO3.LLL.liveSearch.helpDescriptionPages + '</p>'