
    if (key === 40) {
      this.moveLocus(true /* down */);
      this.scrollLocusIntoView();
    } else if (key === 38) {
      this.moveLocus(false /* down */);
      this.scrollLocusIntoView();
    } else if (key === 13) { // Enter.
      this.maybeSelectLocus();
    }
  },

  onQueryChanged_() {
    this.$.clear.style.display = this.query ? 'inline' : '';
    // The selectedItem should reflect the query.
    // When the query is changed, the selectedItem needs to be manually
    // cleared.
    if (th