fix(header-search): "Escape" should clear search query

This commit is contained in:
Eric Liu 2023-11-20 13:34:59 -08:00
commit c42d207b09

View file

@ -114,6 +114,12 @@
selectedResultIndex -= 1; selectedResultIndex -= 1;
} }
break; break;
case 'Escape':
// Reset the search query but keep the search bar active.
// Do not dispatch "clear" event as that should fire only on the "x" button.
value = '';
selectedResultIndex = 0;
break;
} }
}}" }}"
on:paste on:paste