mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-21 15:56:10 +01:00
This commit is contained in:
parent
9dedb59db7
commit
6ab2cea36d
1 changed files with 6 additions and 4 deletions
|
|
@ -135,7 +135,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
|||
if (protyle.disabled) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const viewType = blockElement.getAttribute("data-av-type") as TAVView;
|
||||
let target = event.target;
|
||||
while (target && !target.isEqualNode(blockElement)) {
|
||||
const type = target.getAttribute("data-type");
|
||||
|
|
@ -190,8 +190,10 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
|||
protyle.toolbar.range = document.createRange();
|
||||
protyle.toolbar.range.selectNodeContents(target);
|
||||
focusByRange(protyle.toolbar.range);
|
||||
target.parentElement.classList.add("av__cell--select");
|
||||
addDragFill(target.parentElement);
|
||||
if (viewType === "table") {
|
||||
target.parentElement.classList.add("av__cell--select");
|
||||
addDragFill(target.parentElement);
|
||||
}
|
||||
hintRef(target.previousElementSibling.textContent.trim(), protyle, "av");
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
@ -225,7 +227,7 @@ export const avClick = (protyle: IProtyle, event: MouseEvent & { target: HTMLEle
|
|||
return;
|
||||
}
|
||||
const cellType = getTypeByCellElement(target);
|
||||
if (blockElement.getAttribute("data-av-type") === "gallery") {
|
||||
if (viewType === "gallery") {
|
||||
const itemElement = hasClosestByClassName(target, "av__gallery-item");
|
||||
if (itemElement)
|
||||
if (cellType === "updated" || cellType === "created" || cellType === "lineNumber") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue