Skip to content

Commit

Permalink
🚨
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 27, 2024
1 parent 7577933 commit 19079ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
8 changes: 4 additions & 4 deletions app/src/config/util/snippets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -164,12 +164,12 @@ export const openSnippets = () => {
dialog.element.querySelectorAll('[data-action="search"]').forEach((inputItem: HTMLInputElement) => {
inputItem.addEventListener("input", (event: KeyboardEvent) => {
if (event.isComposing) {
return
return;
}
filterSnippet(dialog, inputItem)
filterSnippet(dialog, inputItem);
});
inputItem.addEventListener("compositionend", () => {
filterSnippet(dialog, inputItem)
filterSnippet(dialog, inputItem);
});
});
});
Expand All @@ -188,7 +188,7 @@ const filterSnippet = (dialog: Dialog, inputItem: HTMLInputElement) => {
snippetPanel.classList.add("fn__none");
}
});
}
};

const genSnippet = (options: ISnippet) => {
return `<div data-id="${options.id || ""}" data-type="${options.type}">
Expand Down
6 changes: 3 additions & 3 deletions app/src/protyle/render/av/action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,9 @@ export const removeAttrViewColAnimation = (blockElement: Element, id: string) =>

export const duplicateCompletely = (protyle:IProtyle, nodeElement:HTMLElement) => {
fetchPost("/api/av/duplicateAttributeViewBlock", {avID: nodeElement.getAttribute("data-av-id")}, (response) => {
nodeElement.classList.remove("protyle-wysiwyg--select")
nodeElement.classList.remove("protyle-wysiwyg--select");
const tempElement = document.createElement("template");
tempElement.innerHTML = protyle.lute.SpinBlockDOM(`<div data-node-id="${response.data.blockID}" data-av-id="${response.data.avID}" data-type="NodeAttributeView" data-av-type="table"></div>`)
tempElement.innerHTML = protyle.lute.SpinBlockDOM(`<div data-node-id="${response.data.blockID}" data-av-id="${response.data.avID}" data-type="NodeAttributeView" data-av-type="table"></div>`);
const cloneElement = tempElement.content.firstElementChild;
nodeElement.after(cloneElement);
avRender(cloneElement, protyle, () => {
Expand All @@ -513,4 +513,4 @@ export const duplicateCompletely = (protyle:IProtyle, nodeElement:HTMLElement) =
id: response.data.blockID,
}]);
});
}
};
2 changes: 1 addition & 1 deletion app/src/protyle/render/av/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ export const updateCellsValue = (protyle: IProtyle, nodeElement: HTMLElement, va
link = aElement.getAttribute("data-href");
name = aElement.textContent;
} else {
const imgElement = tempElement.content.querySelector('.img img');
const imgElement = tempElement.content.querySelector(".img img");
if (imgElement) {
imgSrc = imgElement.getAttribute("data-src");
}
Expand Down
1 change: 0 additions & 1 deletion app/src/util/newFile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {replaceFileName, validateName} from "../editor/rename";
import {hideElements} from "../protyle/ui/hideElements";
import {openMobileFileById} from "../mobile/editor";
import {App} from "../index";
import {insertHTML} from "../protyle/util/insertHTML";
import {escapeHtml} from "./escape";

export const getNewFilePath = (useSavePath: boolean) => {
Expand Down

0 comments on commit 19079ac

Please sign in to comment.