diff --git a/app/src/asset/pdf/view_history.js b/app/src/asset/pdf/view_history.js index 9d66be66e..bcbb824d3 100644 --- a/app/src/asset/pdf/view_history.js +++ b/app/src/asset/pdf/view_history.js @@ -13,6 +13,7 @@ * limitations under the License. */ +import {setStorageVal} from "../../protyle/util/compatibility"; const DEFAULT_VIEW_HISTORY_CACHE_SIZE = 20; /** diff --git a/app/src/search/menu.ts b/app/src/search/menu.ts index 95dd5fd1a..5d0f943fa 100644 --- a/app/src/search/menu.ts +++ b/app/src/search/menu.ts @@ -239,7 +239,7 @@ export const saveCriterion = (config: ISearchOption, saveDialog.destroy(); }); btnsElement[1].addEventListener("click", () => { - const value = saveDialog.element.querySelector("input").value; + const value = saveDialog.element.querySelector("input").value.trim(); if (!value) { showMessage(window.siyuan.languages["_kernel"]["142"]); return; diff --git a/app/src/search/util.ts b/app/src/search/util.ts index e1cc46a75..c6e7a92ca 100644 --- a/app/src/search/util.ts +++ b/app/src/search/util.ts @@ -409,7 +409,7 @@ export const genSearch = (app: App, config: ISearchOption, element: Element, clo event.preventDefault(); break; } else if (target.classList.contains("b3-chip__close") && type === "remove-criteria") { - const name = target.parentElement.innerText.trim(); + const name = target.parentElement.innerText; fetchPost("/api/storage/removeCriterion", {name}); criteriaData.find((item, index) => { if (item.name === name) {