[BUGFIX] LiveSearch: Don't trigger select on valid input 77/45177/3
authorMichael Oehlhof <typo3@oehlhof.de>
Mon, 7 Dec 2015 22:45:36 +0000 (23:45 +0100)
committerGeorg Ringer <georg.ringer@gmail.com>
Wed, 9 Dec 2015 05:42:17 +0000 (06:42 +0100)
Disable automatically selecting a valid search result. Otherwise, if
there is only one suggestion provided and the suggestion perfectly
matches the search string, the result is auto selected and no longer
visible/clickable.

Resolves: #71584
Releases: master
Change-Id: I239bf1dac9ce5b4851af4f48f3771d47ae1d8384
Reviewed-on: https://review.typo3.org/45177
Reviewed-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: Morton Jonuschat <m.jonuschat@mojocode.de>
Reviewed-by: Georg Ringer <georg.ringer@gmail.com>
Tested-by: Georg Ringer <georg.ringer@gmail.com>
typo3/sysext/backend/Resources/Public/JavaScript/LiveSearch.js

index 307e889..67212c4 100644 (file)
@@ -38,6 +38,7 @@ define(['jquery', 'jquery/autocomplete', 'TYPO3/CMS/Backend/jquery.clearable'],
                        forceFixPosition: false,
                        preserveInput: true,
                        showNoSuggestionNotice: true,
+                       triggerSelectOnValidInput: 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>'