From 538aa0803a29e504b48b80f7acd754e358983410 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 10 Oct 2022 10:17:04 +0800 Subject: [PATCH] :bug: fix https://github.com/siyuan-note/siyuan/issues/6127 --- app/src/protyle/toolbar/index.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/src/protyle/toolbar/index.ts b/app/src/protyle/toolbar/index.ts index e5090225c..31e6fbbe9 100644 --- a/app/src/protyle/toolbar/index.ts +++ b/app/src/protyle/toolbar/index.ts @@ -329,7 +329,7 @@ export class Toolbar { const types = item.getAttribute("data-type").split(" "); if (type === "clear") { for (let i = 0; i < types.length; i++) { - if (["strong", "em", "u", "s", "mark", "sup", "sub"].includes(types[i])) { + if (Constants.INLINE_TYPE.includes(types[i])) { types.splice(i, 1); i--; } @@ -621,9 +621,7 @@ export class Toolbar { if (wbrElement) { wbrElement.remove(); } - if (isMobile()) { - focusByRange(this.range); - } + focusByRange(this.range); } public showFileAnnotationRef(protyle: IProtyle, refElement: HTMLElement) {