mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-26 16:02:20 +00:00
Merge pull request #323 from LemmyNet/fix/page-refresh
Don't restore scroll position on page refresh. Fixes #186
This commit is contained in:
commit
535bdf36c2
|
@ -43,8 +43,11 @@ export class WebSocketService {
|
|||
}).pipe(share());
|
||||
|
||||
if (isBrowser()) {
|
||||
window.onbeforeunload = () => {
|
||||
window.onunload = () => {
|
||||
this.ws.close();
|
||||
|
||||
// Clears out scroll positions.
|
||||
sessionStorage.clear();
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue