diff --git a/aio/src/app/search/search-box/search-box.component.spec.ts b/aio/src/app/search/search-box/search-box.component.spec.ts index 1f58b0c05c..1d7c27a2a9 100644 --- a/aio/src/app/search/search-box/search-box.component.spec.ts +++ b/aio/src/app/search/search-box/search-box.component.spec.ts @@ -56,12 +56,6 @@ describe('SearchBoxComponent', () => { input.triggerEventHandler('keyup', { target: { value: 'some query' }, which: 27 }); expect(search.search).not.toHaveBeenCalled(); })); - - it('should set the search part of the browser location', inject([LocationService], (location: MockLocationService) => { - const input = fixture.debugElement.query(By.css('input')); - input.triggerEventHandler('keyup', { target: { value: 'some query' } }); - expect(location.setSearch).toHaveBeenCalledWith('Full Text Search', { search: 'some query' }); - })); }); describe('on focus', () => { diff --git a/aio/src/app/search/search-box/search-box.component.ts b/aio/src/app/search/search-box/search-box.component.ts index 87f2c0a35e..1be305f6d5 100644 --- a/aio/src/app/search/search-box/search-box.component.ts +++ b/aio/src/app/search/search-box/search-box.component.ts @@ -41,11 +41,9 @@ export class SearchBoxComponent implements OnInit { } onSearch(query: string, keyCode?: number) { - if (keyCode === 27) { - // Ignore escape key + if (keyCode === 27) { // ignore escape key return; } - this.locationService.setSearch('Full Text Search', { search: query }); this.searchService.search(query); } }