Fix help page not closing from keybind

This commit is contained in:
Ajay
2022-06-09 14:02:23 -04:00
parent 32a3cb2cfe
commit 25c04a49c1
4 changed files with 7 additions and 6 deletions

View File

@@ -35,7 +35,7 @@ class SubmissionNotice {
contentContainer={contentContainer}
callback={callback}
ref={this.noticeRef}
closeListener={() => this.close()} />,
closeListener={() => this.close(false)} />,
this.noticeElement
);
}
@@ -44,7 +44,8 @@ class SubmissionNotice {
this.noticeRef.current.forceUpdate();
}
close(): void {
close(callRef = true): void {
if (callRef) this.noticeRef.current.cancel();
ReactDOM.unmountComponentAtNode(this.noticeElement);
this.noticeElement.remove();