🚨
This commit is contained in:
parent
a8f183a99f
commit
5befacdda9
10 changed files with 11 additions and 13 deletions
|
@ -230,7 +230,7 @@ export const keymap = {
|
|||
});
|
||||
},
|
||||
search(value: string, keymapString: string) {
|
||||
const keymapListElement = keymap.element.querySelector("#keymapList")
|
||||
const keymapListElement = keymap.element.querySelector("#keymapList");
|
||||
keymapListElement.querySelectorAll(".b3-list-item--hide-action > .b3-list-item__text").forEach(item => {
|
||||
const liElement = item.parentElement;
|
||||
let matchedKeymap = false;
|
||||
|
|
|
@ -426,7 +426,7 @@ export class Files extends Model {
|
|||
item.style.opacity = "";
|
||||
// https://github.com/siyuan-note/siyuan/issues/11587
|
||||
if (index === 0) {
|
||||
const airaLabelElement = item.querySelector(".ariaLabel")
|
||||
const airaLabelElement = item.querySelector(".ariaLabel");
|
||||
showTooltip(airaLabelElement.getAttribute("aria-label"), airaLabelElement);
|
||||
}
|
||||
});
|
||||
|
|
|
@ -58,7 +58,6 @@ import {emitOpenMenu} from "../../plugin/EventBus";
|
|||
import {insertAttrViewBlockAnimation} from "../render/av/row";
|
||||
import {avContextmenu, duplicateCompletely} from "../render/av/action";
|
||||
import {getPlainText} from "../util/paste";
|
||||
import {Menu} from "../../plugin/Menu";
|
||||
import {addEditorToDatabase} from "../render/av/addToDatabase";
|
||||
import {processClonePHElement} from "../render/util";
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ const getHotkeyOrMarker = (hotkey: string, marker: string) => {
|
|||
} else {
|
||||
return `<span class="b3-list-item__meta">${marker}</span>`;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const hintSlash = (key: string, protyle: IProtyle) => {
|
||||
const allList: IHintData[] = [{
|
||||
|
|
|
@ -274,7 +274,7 @@ class="fn__flex-1 fn__flex${["url", "text", "number", "email", "phone", "block"]
|
|||
targetElement.classList.add("dragover__top");
|
||||
}
|
||||
});
|
||||
let counter = 0
|
||||
let counter = 0;
|
||||
element.addEventListener("dragleave", () => {
|
||||
counter--;
|
||||
if (counter === 0) {
|
||||
|
|
|
@ -469,7 +469,7 @@ export const openMenuPanel = (options: {
|
|||
}
|
||||
dragoverElement = targetElement;
|
||||
});
|
||||
let counter = 0
|
||||
let counter = 0;
|
||||
avPanelElement.addEventListener("dragleave", () => {
|
||||
counter--;
|
||||
if (counter === 0) {
|
||||
|
|
|
@ -99,7 +99,7 @@ export const initUI = (protyle: IProtyle) => {
|
|||
// wysiwyg 元素下方点击无效果 https://github.com/siyuan-note/siyuan/issues/12009
|
||||
if (protyle.disabled ||
|
||||
(!event.target.classList.contains("protyle-content") && !event.target.classList.contains("protyle-wysiwyg"))) {
|
||||
return
|
||||
return;
|
||||
}
|
||||
const lastRect = protyle.wysiwyg.element.lastElementChild.getBoundingClientRect();
|
||||
const range = document.createRange();
|
||||
|
|
|
@ -1181,7 +1181,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
|
||||
// 超级块中有a,b两个段落块,移动到 ab 之间的间隙 targetElement 会变为超级块,需修正为 a
|
||||
if (targetElement && (targetElement.classList.contains("bq") || targetElement.classList.contains("sb") || targetElement.classList.contains("list") || targetElement.classList.contains("li"))) {
|
||||
let prevElement = hasClosestBlock(document.elementFromPoint(point.x, point.y - 6))
|
||||
let prevElement = hasClosestBlock(document.elementFromPoint(point.x, point.y - 6));
|
||||
while (prevElement && targetElement.contains(prevElement)) {
|
||||
if (prevElement.nextElementSibling?.getAttribute("data-node-id")) {
|
||||
targetElement = prevElement;
|
||||
|
@ -1373,7 +1373,7 @@ export const dropEvent = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
dragoverElement = targetElement;
|
||||
}
|
||||
});
|
||||
let counter = 0
|
||||
let counter = 0;
|
||||
editorElement.addEventListener("dragleave", (event: DragEvent & { target: HTMLElement }) => {
|
||||
if (protyle.disabled) {
|
||||
event.preventDefault();
|
||||
|
@ -1398,6 +1398,6 @@ const addDragover = (element: HTMLElement) => {
|
|||
element.classList.contains("li") ||
|
||||
element.classList.contains("list") ||
|
||||
element.classList.contains("bq")) {
|
||||
element.classList.add("dragover")
|
||||
element.classList.add("dragover");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -35,7 +35,6 @@ import {dropEvent} from "../util/editorCommonEvent";
|
|||
import {input} from "./input";
|
||||
import {
|
||||
getContenteditableElement,
|
||||
getLastBlock,
|
||||
getNextBlock,
|
||||
getTopAloneElement,
|
||||
hasNextSibling,
|
||||
|
|
|
@ -23,7 +23,7 @@ import {addLoading} from "../protyle/ui/initUI";
|
|||
import {getIconByType} from "../editor/getIcon";
|
||||
import {unicode2Emoji} from "../emoji";
|
||||
import {hasClosestByClassName} from "../protyle/util/hasClosest";
|
||||
import {isNotCtrl, isMac, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||
import {isNotCtrl, setStorageVal, updateHotkeyTip} from "../protyle/util/compatibility";
|
||||
import {newFileByName} from "../util/newFile";
|
||||
import {
|
||||
filterMenu,
|
||||
|
|
Loading…
Add table
Reference in a new issue