mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-09-22 00:20:47 +02:00
🚨
This commit is contained in:
parent
184cf57b04
commit
0c17c68a28
2 changed files with 4 additions and 4 deletions
|
@ -254,9 +254,9 @@ export class Gutter {
|
|||
const itemRect = item.getBoundingClientRect();
|
||||
let gutterTop = this.element.getBoundingClientRect().top + 4;
|
||||
if (itemRect.height < Math.floor(window.siyuan.config.editor.fontSize * 1.625) + 8) {
|
||||
gutterTop = gutterTop - (itemRect.height - this.element.clientHeight) / 2
|
||||
gutterTop = gutterTop - (itemRect.height - this.element.clientHeight) / 2;
|
||||
}
|
||||
return itemRect.top <= gutterTop && itemRect.bottom >= gutterTop
|
||||
return itemRect.top <= gutterTop && itemRect.bottom >= gutterTop;
|
||||
}
|
||||
|
||||
private turnsOneInto(options: {
|
||||
|
|
|
@ -701,7 +701,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
}
|
||||
// 行首转义符前删除 https://github.com/siyuan-note/siyuan/issues/6092
|
||||
if (range.startOffset === 0 &&
|
||||
previousSibling && previousSibling.parentElement.getAttribute("data-type").indexOf('backslash') > -1 &&
|
||||
previousSibling && previousSibling.parentElement.getAttribute("data-type").indexOf("backslash") > -1 &&
|
||||
previousSibling.nodeType !== 3 && (previousSibling as HTMLElement).outerHTML === "<span>\\</span>" &&
|
||||
!hasPreviousSibling(previousSibling)) {
|
||||
range.setStartBefore(previousSibling.parentElement);
|
||||
|
@ -712,7 +712,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
}
|
||||
// 光标位于转义符前 F5 后,rang 和点击后的不同,也需进行判断
|
||||
if (range.startOffset === 1 && range.startContainer.nodeType !== 3 &&
|
||||
range.startContainer.parentElement.getAttribute("data-type").indexOf('backslash') > -1 &&
|
||||
range.startContainer.parentElement.getAttribute("data-type").indexOf("backslash") > -1 &&
|
||||
!hasPreviousSibling(range.startContainer.parentElement)) {
|
||||
range.setStartBefore(range.startContainer.parentElement);
|
||||
removeBlock(protyle, nodeElement, range);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue