Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
💄 The menu no longer extends beyond the window
fix #15400
  • Loading branch information
TCOTC committed Oct 7, 2025
commit e828496584ec30e9b792d3378826100209d1f66d
2 changes: 1 addition & 1 deletion app/src/assets/scss/component/_menu.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
1 change: 1 addition & 0 deletions app/src/menus/Menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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") {
Expand Down