mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 16:24:55 +00:00
FIX: Use chrome's scrollRestoration
to fix scrolling uses with history
This commit is contained in:
parent
e3cc04f315
commit
786f6ff8b0
@ -31,7 +31,12 @@ const DiscourseLocation = Ember.Object.extend({
|
||||
@method 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());
|
||||
const loc = get(this, 'location');
|
||||
|
Loading…
x
Reference in New Issue
Block a user