Skip to content

Commit

Permalink
fix(masthead-search): no redirect on empty value
Browse files Browse the repository at this point in the history
This change ensures redirect to dedicated search page upon clicking on
the loupe icon happens only when there is a search query in the input
box.

Refs carbon-design-system#3883.
  • Loading branch information
asudoh committed Sep 14, 2020
1 parent 2e2a3fa commit 45ec3eb
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ class DDSMastheadSearch extends BXDropdown {
private async _handleClickSearchButton() {
const { active } = this;
if (active) {
this._handleUserInitiatedRedirect();
if (this._searchInputNode.value) {
this._handleUserInitiatedRedirect();
}
} else {
this.active = true;
await this.updateComplete;
Expand Down

0 comments on commit 45ec3eb

Please sign in to comment.