From cf4e9f22ac7358da6cc4365a3cb4801c7d042c24 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Wed, 6 Nov 2024 11:06:22 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E5=A4=9A=E9=80=89=E5=A4=8D=E5=88=B6?= =?UTF-8?q?=E5=88=B0=E5=8D=95=E9=80=89=E4=B8=AD=E4=BC=9A=E5=8F=98=E4=B8=BA?= =?UTF-8?q?=E5=A4=9A=E4=B8=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/protyle/util/insertHTML.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/protyle/util/insertHTML.ts b/app/src/protyle/util/insertHTML.ts index 8cf63e5f1..e9d1a1618 100644 --- a/app/src/protyle/util/insertHTML.ts +++ b/app/src/protyle/util/insertHTML.ts @@ -107,6 +107,9 @@ const processAV = (range: Range, html: string, protyle: IProtyle, blockElement: cellValue.isDetached = true; delete cellValue.block.id; } else if (type === "select" || type === "mSelect") { + if (type === "select" && cellValue.type === "mSelect" && cellValue.mSelect.length > 0) { + cellValue.mSelect.splice(1, cellValue.mSelect.length - 1); + } const operations = mergeAddOption(columns.find(e => e.id === cellElement.dataset.colId), cellValue, avID); doOperations.push(...operations.doOperations); undoOperations.push(...operations.undoOperations);