diff --git a/client/js/views/posts_header_view.js b/client/js/views/posts_header_view.js index ddc5172..c0f86dd 100644 --- a/client/js/views/posts_header_view.js +++ b/client/js/views/posts_header_view.js @@ -115,10 +115,9 @@ class PostsHeaderView extends events.EventTarget { if (this._masstagAutoCompleteControl) { this._masstagAutoCompleteControl.hide(); } - let parameters = { - query: this._queryInputNode.value, - page: this._ctx.parameters.page, - }; + let parameters = {query: this._queryInputNode.value}; + parameters.page = parameters.query === this._ctx.parameters.query ? + this._ctx.parameters.page : 1; if (this._massTagInputNode) { parameters.tag = this._massTagInputNode.value; this._massTagInputNode.blur(); diff --git a/client/js/views/tags_header_view.js b/client/js/views/tags_header_view.js index a395d4f..cb0489e 100644 --- a/client/js/views/tags_header_view.js +++ b/client/js/views/tags_header_view.js @@ -38,6 +38,7 @@ class TagsHeaderView extends events.EventTarget { this._queryInputNode.blur(); this.dispatchEvent(new CustomEvent('navigate', {detail: {parameters: { query: this._queryInputNode.value, + page: 1, }}})); } } diff --git a/client/js/views/users_header_view.js b/client/js/views/users_header_view.js index 21ba1f1..e4f1c14 100644 --- a/client/js/views/users_header_view.js +++ b/client/js/views/users_header_view.js @@ -31,6 +31,7 @@ class UsersHeaderView extends events.EventTarget { e.preventDefault(); this.dispatchEvent(new CustomEvent('navigate', {detail: {parameters: { query: this._queryInputNode.value, + page: 1, }}})); } }