mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 03:32:03 +03:00
fix: a right-aligned menu no longer creeps sideways while it opens (#34227)
This commit is contained in:
@@ -206,7 +206,7 @@
|
||||
const preferredTop = openAbove
|
||||
? rect.top - constrainedHeight - sideOffset
|
||||
: rect.bottom + sideOffset;
|
||||
const contentWidth = contentEl.offsetWidth || 0;
|
||||
const contentWidth = Math.max(contentEl.scrollWidth || 0, contentEl.offsetWidth || 0);
|
||||
const preferredLeft = align === 'end' && contentWidth ? rect.right - contentWidth : rect.left;
|
||||
const maxLeft = contentWidth ? viewportRight - contentWidth - pad : preferredLeft;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user