💄 The menu no longer extends beyond the window

fix https://github.com/siyuan-note/siyuan/issues/15400
This commit is contained in:
Jeffrey Chen 2025-08-01 14:53:52 +08:00
parent c7c0906082
commit e828496584
2 changed files with 2 additions and 1 deletions

View file

@ -169,7 +169,7 @@
}
&__items {
max-height: 80vh;
max-height: min(80vh, calc(100vh - 20px - var(--b3-menu-position-top, 0px))); // 20px .b3-menu 的上下 padding
overflow: auto;
padding: 0 8px;
}

View file

@ -146,6 +146,7 @@ export class Menu {
this.element.style.zIndex = (++window.siyuan.zIndex).toString();
this.element.classList.remove("fn__none");
setPosition(this.element, options.x - (options.isLeft ? this.element.clientWidth : 0), options.y, options.h, options.w);
this.element.style.setProperty("--b3-menu-position-top", this.element.style.top);
}
public fullscreen(position: "bottom" | "all" = "all") {