chore(client): remove unload event from exam/show.tsx (#56678)

This commit is contained in:
Huyen Nguyen 2024-10-15 07:55:40 -07:00 committed by GitHub
parent ba338d34da
commit b3d4241bd6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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();