From 2183a7f8794a7c7bdd42b095a7feb39cdc7d0089 Mon Sep 17 00:00:00 2001 From: Alexander Skvortsov Date: Mon, 8 Mar 2021 22:45:39 -0500 Subject: [PATCH] Search: dont adjust height if not rendered --- framework/core/js/src/forum/components/Search.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/framework/core/js/src/forum/components/Search.js b/framework/core/js/src/forum/components/Search.js index cc1083c03..5f1b82ce2 100644 --- a/framework/core/js/src/forum/components/Search.js +++ b/framework/core/js/src/forum/components/Search.js @@ -114,6 +114,9 @@ export default class Search extends Component { // Highlight the item that is currently selected. this.setIndex(this.getCurrentNumericIndex()); + // If there are no sources, the search view is not shown. + if (!this.sources.length) return; + // Since extensions might add elements above the search box on mobile, // we need to calculate and set the max height dynamically. const resultsElementMargin = 14;