preserve search page mode on manual search
This commit is contained in:
parent
460d306f60
commit
14b9f4a827
@ -152,9 +152,13 @@ class DisplaySearch extends Display {
|
|||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
const query = this.query.value;
|
const query = this.query.value;
|
||||||
|
|
||||||
this.queryParser.setText(query);
|
this.queryParser.setText(query);
|
||||||
const queryString = query.length > 0 ? `?query=${encodeURIComponent(query)}` : '';
|
|
||||||
window.history.pushState(null, '', `${window.location.pathname}${queryString}`);
|
const url = new URL(window.location.href);
|
||||||
|
url.searchParams.set('query', query);
|
||||||
|
window.history.pushState(null, '', url.toString());
|
||||||
|
|
||||||
this.onSearchQueryUpdated(query, true);
|
this.onSearchQueryUpdated(query, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user