FIX: disable browser `history.scrollRestoration` feature (#24550)
When going 'back', default browser behavior is to restore the scroll position. Unfortunately sites are given no control over the timing of this restoration, which means it can happen halfway through an Ember transition. Therefore we disable it, and re-implement the functionality in our scroll-manager service.
We inadvertently dropped this configuration in 7c9cf666da
, which led to issues like https://meta.discourse.org/t/286463
This commit is contained in:
parent
bf9c0c4889
commit
34a859d628
|
@ -44,6 +44,10 @@ const Discourse = Application.extend({
|
|||
Error.stackTraceLimit = Infinity;
|
||||
}
|
||||
|
||||
// Our scroll-manager service takes care of storing and restoring scroll position.
|
||||
// Disable browser handling:
|
||||
window.history.scrollRestoration = "manual";
|
||||
|
||||
loadInitializers(this);
|
||||
},
|
||||
|
||||
|
|
Loading…
Reference in New Issue