Skip to content

Commit

Permalink
[BUGFIX] Call autocomplete only if field is available
Browse files Browse the repository at this point in the history
Resolves: #84335
Related: #82592
Related: #82969
Releases: master
Change-Id: I6afa442fdfb86e2ffeff0b3c39c12ed2c7e8df6c
Reviewed-on: https://review.typo3.org/56211
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
Tested-by: Tymoteusz Motylewski <t.motylewski@gmail.com>
  • Loading branch information
andreaskienast authored and lolli42 committed Mar 16, 2018
1 parent ab9bbe2 commit 7e1f77e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Expand Up @@ -173,7 +173,6 @@ class LiveSearch {

private registerEvents(): void {
const $searchField = $(Identifiers.searchFieldSelector);
const $autocompleteContainer = $('.' + $searchField.autocomplete().options.containerClass);

$(Identifiers.containerSelector).on('click', '.t3js-live-search-show-all', (evt: JQueryEventObject): void => {
evt.preventDefault();
Expand All @@ -182,6 +181,7 @@ class LiveSearch {
$searchField.val('').trigger('change');
});
if ($searchField.length) {
const $autocompleteContainer = $('.' + $searchField.autocomplete().options.containerClass);
$autocompleteContainer.on('click.autocomplete', '.dropdown-list-link', (evt: JQueryEventObject): void => {
evt.preventDefault();

Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 7e1f77e

Please sign in to comment.