diff options
author | Ajay <[email protected]> | 2022-06-09 14:02:23 -0400 |
---|---|---|
committer | Ajay <[email protected]> | 2022-06-09 14:02:23 -0400 |
commit | 25c04a49c131a4b4c9b2d229d4aa84d7ec36cbca (patch) | |
tree | f96e85293b6f93234e54e5ae400d6c8bb6723e9f /src/render | |
parent | 32a3cb2cfeefa9e4f9d06e56e1e3cc3e5669b892 (diff) | |
download | SponsorBlock-25c04a49c131a4b4c9b2d229d4aa84d7ec36cbca.tar.gz SponsorBlock-25c04a49c131a4b4c9b2d229d4aa84d7ec36cbca.zip |
Fix help page not closing from keybind
Diffstat (limited to 'src/render')
-rw-r--r-- | src/render/SubmissionNotice.tsx | 5 |
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(); |