From 3b4fcbd526780794891449cf33b15fb2b1d8693c Mon Sep 17 00:00:00 2001 From: Xun Sun Date: Thu, 24 Apr 2025 10:09:00 +0800 Subject: [PATCH] fix(editor): for single-select, picking the original option should make the TagManager disappear (#11745) --- .../data-view/src/core/component/tags/multi-tag-select.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/blocksuite/affine/data-view/src/core/component/tags/multi-tag-select.ts b/blocksuite/affine/data-view/src/core/component/tags/multi-tag-select.ts index 0aaa1e8d21..be1383eee9 100644 --- a/blocksuite/affine/data-view/src/core/component/tags/multi-tag-select.ts +++ b/blocksuite/affine/data-view/src/core/component/tags/multi-tag-select.ts @@ -177,7 +177,7 @@ class TagManager { } selectTag(id: string) { - if (this.isSelected(id)) { + if (!this.isSingleMode && this.isSelected(id)) { return; } const newValue = this.isSingleMode ? [id] : [...this.value$.value, id];