Vanessa 2 anni fa
parent
commit
398afa854f
1 ha cambiato i file con 1 aggiunte e 1 eliminazioni
  1. 1 1
      app/src/menus/bookmark.ts

+ 1 - 1
app/src/menus/bookmark.ts

@@ -67,7 +67,7 @@ export const openBookmarkMenu = (element: HTMLElement, event: MouseEvent, bookma
             icon: "iconTrashcan",
             icon: "iconTrashcan",
             label: window.siyuan.languages.remove,
             label: window.siyuan.languages.remove,
             click: () => {
             click: () => {
-                const bookmarkText = (id ? element.parentElement.previousElementSibling : element).querySelector(".b3-list-item__text").textContent;
+                const bookmarkText = element.querySelector(".b3-list-item__text").textContent;
                 confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmarkText)}</b>?`, () => {
                 confirmDialog(window.siyuan.languages.deleteOpConfirm, `${window.siyuan.languages.confirmDelete} <b>${escapeHtml(bookmarkText)}</b>?`, () => {
                     if (id) {
                     if (id) {
                         fetchPost("/api/attr/setBlockAttrs", {id, attrs: {bookmark: ""}}, () => {
                         fetchPost("/api/attr/setBlockAttrs", {id, attrs: {bookmark: ""}}, () => {