diff options
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({ |