mirror of
https://github.com/codeninjasllc/discourse.git
synced 2025-05-03 17:35:09 -04:00
FIX: Use chrome's scrollRestoration
to fix scrolling uses with history
This commit is contained in:
parent
e3cc04f315
commit
786f6ff8b0
1 changed files with 6 additions and 1 deletions
|
@ -31,7 +31,12 @@ const DiscourseLocation = Ember.Object.extend({
|
||||||
@method initState
|
@method initState
|
||||||
*/
|
*/
|
||||||
initState() {
|
initState() {
|
||||||
set(this, 'history', get(this, 'history') || window.history);
|
const history = get(this, 'history') || window.history;
|
||||||
|
if (history && history.scrollRestoration) {
|
||||||
|
history.scrollRestoration = "manual";
|
||||||
|
}
|
||||||
|
|
||||||
|
set(this, 'history', history);
|
||||||
|
|
||||||
let url = this.formatURL(this.getURL());
|
let url = this.formatURL(this.getURL());
|
||||||
const loc = get(this, 'location');
|
const loc = get(this, 'location');
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue