mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-11-08 09:34:16 +00:00
Don't restore scroll position on page refresh. Fixes #186
This commit is contained in:
parent
b0eac0e9fa
commit
35f1b18e67
|
@ -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