mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 09:00:12 +01:00
This commit is contained in:
parent
b166fd87cd
commit
6bafc1b050
1 changed files with 7 additions and 3 deletions
|
|
@ -1008,7 +1008,7 @@ export class WYSIWYG {
|
||||||
if (range.toString() === "" ||
|
if (range.toString() === "" ||
|
||||||
window.siyuan.shiftIsPressed // https://ld246.com/article/1650096678723
|
window.siyuan.shiftIsPressed // https://ld246.com/article/1650096678723
|
||||||
) {
|
) {
|
||||||
if (event.detail === 3) {
|
if (event.detail > 2) {
|
||||||
// table 前或最后一个 cell 三击状态不对
|
// table 前或最后一个 cell 三击状态不对
|
||||||
let cursorElement = hasClosestBlock(range.startContainer) as Element;
|
let cursorElement = hasClosestBlock(range.startContainer) as Element;
|
||||||
if (cursorElement) {
|
if (cursorElement) {
|
||||||
|
|
@ -1031,7 +1031,7 @@ export class WYSIWYG {
|
||||||
}
|
}
|
||||||
const startBlockElement = hasClosestBlock(range.startContainer);
|
const startBlockElement = hasClosestBlock(range.startContainer);
|
||||||
let endBlockElement: false | HTMLElement;
|
let endBlockElement: false | HTMLElement;
|
||||||
if (mouseUpEvent.detail === 3 && range.endContainer.nodeType !== 3 && (range.endContainer as HTMLElement).tagName === "DIV" && range.endOffset === 0) {
|
if (mouseUpEvent.detail > 2 && range.endContainer.nodeType !== 3 && (range.endContainer as HTMLElement).tagName === "DIV" && range.endOffset === 0) {
|
||||||
// 三击选中段落块时,rangeEnd 会在下一个块
|
// 三击选中段落块时,rangeEnd 会在下一个块
|
||||||
if ((range.endContainer as HTMLElement).classList.contains("protyle-attr") && startBlockElement) {
|
if ((range.endContainer as HTMLElement).classList.contains("protyle-attr") && startBlockElement) {
|
||||||
// 三击在悬浮层中会选择到 attr https://github.com/siyuan-note/siyuan/issues/4636
|
// 三击在悬浮层中会选择到 attr https://github.com/siyuan-note/siyuan/issues/4636
|
||||||
|
|
@ -1376,7 +1376,11 @@ export class WYSIWYG {
|
||||||
} else {
|
} else {
|
||||||
nodeElement.removeAttribute("data-render");
|
nodeElement.removeAttribute("data-render");
|
||||||
avRender(nodeElement, protyle, () => {
|
avRender(nodeElement, protyle, () => {
|
||||||
openViewMenu({protyle, blockElement: nodeElement, element: nodeElement.querySelector(".item.item--focus")});
|
openViewMenu({
|
||||||
|
protyle,
|
||||||
|
blockElement: nodeElement,
|
||||||
|
element: nodeElement.querySelector(".item.item--focus")
|
||||||
|
});
|
||||||
}, avTabHeaderElement.dataset.id);
|
}, avTabHeaderElement.dataset.id);
|
||||||
}
|
}
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue