mirror of
https://github.com/rr-/szurubooru.git
synced 2025-07-17 08:26:24 +00:00
client/routing: fix certain history bug
The bug could be reproduced as follows: 1. Navigate to /posts 2. Search for "test" 3. Navigate to /posts again 4. Refresh the page The user should see plain post list, but instead they were seeing the "test" search results again as if step 3 never happened.
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
'use strict';
|
||||
|
||||
const config = require('../config.js');
|
||||
const router = require('../router.js');
|
||||
const api = require('../api.js');
|
||||
const settings = require('../models/settings.js');
|
||||
const uri = require('../util/uri.js');
|
||||
@ -54,9 +55,7 @@ class PostListController {
|
||||
}
|
||||
|
||||
_evtNavigate(e) {
|
||||
history.pushState(
|
||||
null,
|
||||
window.title,
|
||||
router.showNoDispatch(
|
||||
uri.formatClientLink('posts', e.detail.parameters));
|
||||
Object.assign(this._ctx.parameters, e.detail.parameters);
|
||||
this._syncPageController();
|
||||
|
Reference in New Issue
Block a user