fix: 2 context menu width fixes
- base.html showContextMenu: edge detection (menu never overflows right/bottom) - app.css .more-menu: min-width:200px → unset + width:max-content - 143 tests passent
This commit is contained in:
+12
-2
@@ -1071,10 +1071,20 @@
|
||||
},
|
||||
|
||||
showContextMenu(event, pageId, pageName) {
|
||||
var x = event.clientX, y = event.clientY;
|
||||
// Prevent menu from overflowing right edge
|
||||
var viewW = window.innerWidth;
|
||||
var viewH = window.innerHeight;
|
||||
var menuW = 210; // max-width ~240, safe estimate
|
||||
var menuH = 360; // approximate max height
|
||||
if (x + menuW > viewW) x = viewW - menuW - 8;
|
||||
if (y + menuH > viewH) y = viewH - menuH - 8;
|
||||
if (x < 0) x = 8;
|
||||
if (y < 0) y = 8;
|
||||
this.contextMenu = {
|
||||
visible: true,
|
||||
x: event.clientX,
|
||||
y: event.clientY,
|
||||
x: x,
|
||||
y: y,
|
||||
pageId: pageId,
|
||||
pageName: pageName
|
||||
};
|
||||
|
||||
+1
-1
@@ -2782,7 +2782,7 @@ button.breadcrumb-current { max-width: 260px; }
|
||||
position: absolute; top: calc(100% + 4px); right: 0;
|
||||
background: var(--bg-modal); border: 1px solid var(--border);
|
||||
border-radius: var(--radius-md); box-shadow: var(--shadow-popover);
|
||||
min-width: 200px; z-index: 100; padding: 4px 0;
|
||||
min-width: unset; width: max-content; z-index: 100; padding: 4px 0;
|
||||
}
|
||||
.more-menu-item {
|
||||
padding: 8px 14px; font-size: 13px; color: var(--text-primary);
|
||||
|
||||
Reference in New Issue
Block a user