From 285b71b6aac7c2199c778ac1c99713fee0e8a23b Mon Sep 17 00:00:00 2001 From: Hadi Nategh Date: Mon, 7 Mar 2022 11:41:02 +0100 Subject: [PATCH] WIP taglist: Fix backspace doesn't remove selected tags --- api/js/etemplate/Et2Taglist/TaglistSelection.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Taglist/TaglistSelection.ts b/api/js/etemplate/Et2Taglist/TaglistSelection.ts index ecc4b466b9..aff3b8a457 100644 --- a/api/js/etemplate/Et2Taglist/TaglistSelection.ts +++ b/api/js/etemplate/Et2Taglist/TaglistSelection.ts @@ -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; } } }