mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-24 07:54:07 +01:00
This commit is contained in:
parent
21d4eea41b
commit
24c57bc647
10 changed files with 155 additions and 46 deletions
|
|
@ -26,7 +26,7 @@ export const scrollEvent = (protyle: IProtyle, element: HTMLElement) => {
|
|||
|
||||
protyle.wysiwyg.element.querySelectorAll(".av").forEach((item: HTMLElement) => {
|
||||
if (item.parentElement.classList.contains("protyle-wysiwyg")) {
|
||||
const headerTop = item.offsetTop - 30 + 56; // 30 - 面包屑, 56 - tab+title
|
||||
const headerTop = item.offsetTop + 48;
|
||||
const headerElement = item.querySelector(".av__row--header") as HTMLElement;
|
||||
if (headerElement) {
|
||||
if (headerTop < element.scrollTop && headerTop + headerElement.parentElement.clientHeight > element.scrollTop) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue