[BUGFIX] Continue searching after empty result 62/49562/2
authorAlexander Jahn <jahn.typo3@googlemail.com>
Mon, 22 Aug 2016 07:09:00 +0000 (09:09 +0200)
committerWouter Wolters <typo3@wouterwolters.nl>
Tue, 23 Aug 2016 18:57:46 +0000 (20:57 +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/49562
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
typo3/sysext/backend/Resources/Public/JavaScript/LiveSearch.js

index 67212c4..d36019c 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>'