diff options
author | 2020-01-07 00:19:09 +0700 | |
---|---|---|
committer | 2020-01-07 00:19:09 +0700 | |
commit | 7f1f2c52d8deeb0fddb7a7322af7dd090ac19461 (patch) | |
tree | 6d5aba6a51777875918a609e4fdf2534870169be /source/features/batch-open-issues.tsx | |
parent | dac2a0302aad5462c3a6b896fc66b18391c73d12 (diff) | |
download | refined-github-7f1f2c52d8deeb0fddb7a7322af7dd090ac19461.tar.gz refined-github-7f1f2c52d8deeb0fddb7a7322af7dd090ac19461.tar.zst refined-github-7f1f2c52d8deeb0fddb7a7322af7dd090ac19461.zip |
Keep features working after clicking the browser’s Back button (#2639)
Diffstat (limited to 'source/features/batch-open-issues.tsx')
-rw-r--r-- | source/features/batch-open-issues.tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/features/batch-open-issues.tsx b/source/features/batch-open-issues.tsx index f85c62a7..0a53a3ee 100644 --- a/source/features/batch-open-issues.tsx +++ b/source/features/batch-open-issues.tsx @@ -1,5 +1,6 @@ import React from 'dom-chef'; import select from 'select-dom'; +import delegate from 'delegate-it'; import features from '../libs/features'; const confirmationRequiredCount = 10; @@ -35,13 +36,14 @@ function init(): void | false { return false; } + delegate('.rgh-batch-open-issues', 'click', openIssues); + const filtersBar = select('.table-list-header-toggle:not(.states)'); if (filtersBar) { filtersBar.prepend( <button type="button" - onClick={openIssues} - className="btn-link rgh-open-all-selected pr-2" + className="btn-link rgh-batch-open-issues pr-2" > Open All </button> @@ -54,8 +56,7 @@ function init(): void | false { triageFiltersBar.append( <button type="button" - onClick={openIssues} - className="btn-link rgh-open-all-selected pl-3" + className="btn-link rgh-batch-open-issues pl-3" > Open all </button> |