aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/render
diff options
context:
space:
mode:
authorAjay <[email protected]>2022-06-09 14:02:23 -0400
committerAjay <[email protected]>2022-06-09 14:02:23 -0400
commit25c04a49c131a4b4c9b2d229d4aa84d7ec36cbca (patch)
treef96e85293b6f93234e54e5ae400d6c8bb6723e9f /src/render
parent32a3cb2cfeefa9e4f9d06e56e1e3cc3e5669b892 (diff)
downloadSponsorBlock-25c04a49c131a4b4c9b2d229d4aa84d7ec36cbca.tar.gz
SponsorBlock-25c04a49c131a4b4c9b2d229d4aa84d7ec36cbca.zip
Fix help page not closing from keybind
Diffstat (limited to 'src/render')
-rw-r--r--src/render/SubmissionNotice.tsx5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/render/SubmissionNotice.tsx b/src/render/SubmissionNotice.tsx
index 5f646063..9164666d 100644
--- a/src/render/SubmissionNotice.tsx
+++ b/src/render/SubmissionNotice.tsx
@@ -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();