WIP taglist: Fix backspace doesn't remove selected tags

This commit is contained in:
Hadi Nategh 2022-03-07 11:41:02 +01:00
parent f76ee3c920
commit 285b71b6aa

View File

@ -183,8 +183,8 @@ export class TaglistSelection extends LitElement {
__inputOnKeyup(ev) {
if (ev.key === 'Backspace') {
if (!this._inputNode.value) {
if (this.selectedTags.length) {
this.selectedTags[this.selectedTags.length - 1].checked = false;
if (this.__getSelectedTags().length) {
this.__getSelectedTags()[this.__getSelectedTags().length - 1].checked = false;
}
}
}