Skip to content

Commit

Permalink
Search: dont adjust height if not rendered
Browse files Browse the repository at this point in the history
  • Loading branch information
askvortsov1 committed Mar 9, 2021
1 parent a2f52c0 commit b88a7cb
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions js/src/forum/components/Search.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b88a7cb

Please sign in to comment.