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/cycle-lists-with-keyboard-shortcuts.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/cycle-lists-with-keyboard-shortcuts.tsx')
-rw-r--r-- | source/features/cycle-lists-with-keyboard-shortcuts.tsx | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/source/features/cycle-lists-with-keyboard-shortcuts.tsx b/source/features/cycle-lists-with-keyboard-shortcuts.tsx index 2077b323..a0283167 100644 --- a/source/features/cycle-lists-with-keyboard-shortcuts.tsx +++ b/source/features/cycle-lists-with-keyboard-shortcuts.tsx @@ -46,12 +46,8 @@ function init(): void { // Input fields for projects and milestones are added dynamically to the page // GitHub triggers events on the document element for us, which can be used to detect new input elements - delegate(document, '.js-filterable-field', 'filterable:change', event => { - populateSelectableItems(); - - const input = event.delegateTarget as HTMLElement; - input.addEventListener('keydown', handleKeyDown); - }); + delegate(document, '.js-filterable-field', 'filterable:change', populateSelectableItems); + delegate(document, '.js-filterable-field', 'keydown', handleKeyDown); } features.add({ |