mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-06-16 21:06:35 +08:00
chore(client): remove unload event from exam/show.tsx (#56678)
This commit is contained in:
parent
ba338d34da
commit
b3d4241bd6
@ -257,7 +257,6 @@ class ShowExam extends Component<ShowExamProps, ShowExamState> {
|
||||
this.props.startExam();
|
||||
|
||||
window.addEventListener('beforeunload', this.stopWindowClose);
|
||||
window.addEventListener('unload', this.stopWindowClose);
|
||||
window.addEventListener('popstate', this.stopBrowserBack);
|
||||
}
|
||||
);
|
||||
@ -298,7 +297,6 @@ class ShowExam extends Component<ShowExamProps, ShowExamState> {
|
||||
});
|
||||
|
||||
window.removeEventListener('beforeunload', this.stopWindowClose);
|
||||
window.removeEventListener('unload', this.stopWindowClose);
|
||||
window.removeEventListener('popstate', this.stopBrowserBack);
|
||||
|
||||
this.props.clearExamResults();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user