mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-01-08 12:04:29 -05:00
chore(client): remove unload event from exam/show.tsx (#56678)
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user