This commit is contained in:
Vanessa 2023-09-18 10:44:12 +08:00
parent 57f9c4ddc1
commit 1eebdf9029

View file

@ -63,7 +63,8 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
const targetElement = document.elementFromPoint(elementRect.left + elementRect.width / 2, elementRect.top + 10);
const blockElement = hasClosestBlock(targetElement);
if (!blockElement) {
if (protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") === "1" &&
if ((protyle.wysiwyg.element.firstElementChild.getAttribute("data-eof") === "1" ||
protyle.wysiwyg.element.firstElementChild.getAttribute("data-node-index") === "0") &&
(hasClosestByClassName(targetElement, "protyle-background") || hasClosestByClassName(targetElement, "protyle-title"))) {
const inputElement = protyle.scroll.element.querySelector(".b3-slider") as HTMLInputElement;
inputElement.value = "1";