From: Andreas Fernandez Date: Wed, 18 Oct 2017 19:49:36 +0000 (+0200) Subject: [BUGFIX] Remove style attribute in LiveSearch X-Git-Tag: v9.0.0~345 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/6901100422146ef996ee197b116ae9602ae4547a [BUGFIX] Remove style attribute in LiveSearch Currently, `beforeRender` removes some inline CSS so adjust the layout of the suggest list. If the first search has no result, the layout is broken because `beforeRender` is not called in case there are no results. This patch removes the style attribute as early as possible. Resolves: #82757 Releases: master, 8.7 Change-Id: I844b81aca43bd469dfdbb46516366f4786d0935f Reviewed-on: https://review.typo3.org/54439 Reviewed-by: Mathias Schreiber Tested-by: Mathias Schreiber Tested-by: TYPO3com Reviewed-by: Wouter Wolters Tested-by: Wouter Wolters --- diff --git a/typo3/sysext/backend/Resources/Public/JavaScript/LiveSearch.js b/typo3/sysext/backend/Resources/Public/JavaScript/LiveSearch.js index b5bc5cfd3e7a..1f71e7ba3da7 100644 --- a/typo3/sysext/backend/Resources/Public/JavaScript/LiveSearch.js +++ b/typo3/sysext/backend/Resources/Public/JavaScript/LiveSearch.js @@ -104,8 +104,7 @@ define([ } }, beforeRender: function(container) { - // Unset height, width and z-index again, should be fixed by the plugin at a later point - container.attr('style', '').append('
' + + container.append('
' + '' + TYPO3.LLL.liveSearch.showAllResults + '' + @@ -134,6 +133,9 @@ define([ $(searchFieldSelector).val('').trigger('change'); }); + // Unset height, width and z-index + $(toolbarItem).removeAttr('style'); + $(searchFieldSelector).clearable({ onClear: function() { if ($(toolbarItem).hasClass('open')) {