Skip to content

Commit 2006a93

Browse files
committed
2 parents 98aacc2 + 791c00d commit 2006a93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/app/components/content/IsaacParsonsQuestion.tsx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,12 @@ class IsaacParsonsQuestionComponent extends React.Component<IsaacParsonsQuestion
4444
window.addEventListener('keyup', this.onKeyUp);
4545
}
4646

47+
componentWillUnmount() {
48+
window.removeEventListener('mousemove', this.onMouseMove);
49+
window.removeEventListener('touchmove', this.onMouseMove);
50+
window.removeEventListener('keyup', this.onKeyUp);
51+
}
52+
4753
componentDidUpdate = (prevProps: IsaacParsonsQuestionProps, prevState: IsaacParsonsQuestionState) => {
4854
if (!prevProps.currentAttempt && !this.props.currentAttempt) {
4955
const defaultAttempt: ParsonsChoiceDTO = {

0 commit comments

Comments
 (0)