client/posts: remember offset when opening/closing bulk editor
Fixes rr-#274 Squashed with commit "client/posts: make prevQuery a const"
This commit is contained in:
parent
4f5ea9c5ed
commit
eb49aea683
1 changed files with 4 additions and 2 deletions
|
@ -246,8 +246,10 @@ class PostsHeaderView extends events.EventTarget {
|
|||
_navigate() {
|
||||
this._autoCompleteControl.hide();
|
||||
let parameters = {query: this._queryInputNode.value};
|
||||
parameters.offset = parameters.query === this._ctx.parameters.query ?
|
||||
this._ctx.parameters.offset : 0;
|
||||
|
||||
// convert falsy values to an empty string "" so that we can correctly compare with the current query
|
||||
const prevQuery = this._ctx.parameters.query ? this._ctx.parameters.query : "";
|
||||
parameters.offset = parameters.query === prevQuery ? this._ctx.parameters.offset : 0;
|
||||
if (this._bulkTagEditor && this._bulkTagEditor.opened) {
|
||||
parameters.tag = this._bulkTagEditor.value;
|
||||
this._bulkTagEditor.blur();
|
||||
|
|
Loading…
Reference in a new issue