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 <mathias.schreiber@typo3.com>
Tested-by: Mathias Schreiber <mathias.schreiber@typo3.com>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Tested-by: Wouter Wolters <typo3@wouterwolters.nl>
}
},
beforeRender: function(container) {
}
},
beforeRender: function(container) {
- // Unset height, width and z-index again, should be fixed by the plugin at a later point
- container.attr('style', '').append('<hr><div>' +
+ container.append('<hr><div>' +
'<a href="#" class="btn btn-primary pull-right t3js-live-search-show-all">' +
TYPO3.LLL.liveSearch.showAllResults +
'</a>' +
'<a href="#" class="btn btn-primary pull-right t3js-live-search-show-all">' +
TYPO3.LLL.liveSearch.showAllResults +
'</a>' +
$(searchFieldSelector).val('').trigger('change');
});
$(searchFieldSelector).val('').trigger('change');
});
+ // Unset height, width and z-index
+ $(toolbarItem).removeAttr('style');
+
$(searchFieldSelector).clearable({
onClear: function() {
if ($(toolbarItem).hasClass('open')) {
$(searchFieldSelector).clearable({
onClear: function() {
if ($(toolbarItem).hasClass('open')) {