mirror of
https://github.com/open-webui/open-webui.git
synced 2026-10-11 03:38:02 +00:00
fix: Download choices open off the left edge of the screen on phones (#32179)
On a narrow phone screen, the Download choices in the chat header menu, in a chat's menu in the sidebar and in the note menu opened to the left of the menu, past the edge of the screen, with their labels cut off. When there is no room for them on either side of the menu, they now open over the menu, fully on screen. Where there is room beside the menu, they open as before. Fixes #32015
This commit is contained in:
parent
e86c82406d
commit
f7727e24b9
1 changed files with 6 additions and 1 deletions
|
|
@ -76,7 +76,12 @@
|
|||
contentEl.style.paddingLeft = `${sideOffset}px`;
|
||||
} else {
|
||||
// Open to the left: position flush with trigger, bridge gap with right padding
|
||||
contentEl.style.right = `${window.innerWidth - rect.left}px`;
|
||||
// Neither side fits on narrow screens: overlap the menu to stay on screen
|
||||
const right = Math.min(
|
||||
window.innerWidth - rect.left,
|
||||
window.innerWidth - contentWidth - sideOffset - 16
|
||||
);
|
||||
contentEl.style.right = `${right}px`;
|
||||
contentEl.style.left = 'auto';
|
||||
contentEl.style.paddingRight = `${sideOffset}px`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue