mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-23 11:21:26 +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
1 changed files with 4 additions and 1 deletions
|
@ -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