mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
This commit is contained in:
parent
02d709ccee
commit
910c2c1428
1 changed files with 5 additions and 3 deletions
|
|
@ -10,7 +10,7 @@ import {
|
|||
} from "../util/selection";
|
||||
import {
|
||||
hasClosestBlock,
|
||||
hasClosestByAttribute,
|
||||
hasClosestByAttribute, hasClosestByClassName,
|
||||
hasClosestByMatchTag,
|
||||
hasTopClosestByAttribute
|
||||
} from "../util/hasClosest";
|
||||
|
|
@ -996,14 +996,16 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
|
||||
if (matchHotKey(window.siyuan.config.keymap.editor.general.quickMakeCard.custom, event)) {
|
||||
const selectElement: Element[] = [];
|
||||
nodeElement.classList.add("protyle-wysiwyg--select");
|
||||
if (!hasClosestByClassName(nodeElement, "protyle-wysiwyg--select")) {
|
||||
nodeElement.classList.add("protyle-wysiwyg--select");
|
||||
}
|
||||
let isRemove = true;
|
||||
const removeIds: string[] = [];
|
||||
protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select").forEach(item => {
|
||||
selectElement.push(item);
|
||||
item.classList.remove("protyle-wysiwyg--select");
|
||||
removeIds.push(item.getAttribute("data-node-id"));
|
||||
if ((item.getAttribute("custom-riff-decks") || "").indexOf(Constants.QUICK_DECK_ID) > -1) {
|
||||
if ((item.getAttribute("custom-riff-decks") || "").indexOf(Constants.QUICK_DECK_ID) === -1) {
|
||||
isRemove = false;
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue