Extracted keyboard nav. from dropdowns to share w/ search

This commit is contained in:
Dan Brown
2022-11-21 17:35:19 +00:00
parent e7e83a4109
commit 0e528986ab
5 changed files with 126 additions and 61 deletions

View File

@ -1,5 +1,6 @@
import * as Dates from "../services/dates";
import {onSelect} from "../services/dom";
import {debounce} from "../services/util";
/**
* Page Editor
@ -69,7 +70,8 @@ class PageEditor {
});
// Changelog controls
this.changelogInput.addEventListener('change', this.updateChangelogDisplay.bind(this));
const updateChangelogDebounced = debounce(this.updateChangelogDisplay.bind(this), 300, false);
this.changelogInput.addEventListener('input', updateChangelogDebounced);
// Draft Controls
onSelect(this.saveDraftButton, this.saveDraft.bind(this));