Fixed the position of the panel in the mobile view (#7449)

This commit is contained in:
Alexander Platov 2024-12-13 08:41:01 +03:00 committed by GitHub
parent 088c37fa20
commit 4234642714
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,24 @@
const fitPopup = (props: PanelProps, contentPanel: HTMLElement): void => { const fitPopup = (props: PanelProps, contentPanel: HTMLElement): void => {
if (modalHTML != null) { if (modalHTML != null) {
const device: DeviceOptions = $deviceInfo const device: DeviceOptions = $deviceInfo
options = fitPopupElement(modalHTML, device, props.element, contentPanel) options =
device.isMobile && device.docWidth <= 480
? {
props: {
top: 'var(--status-bar-height)',
bottom: '4.25rem',
left: '0',
right: '0',
width: '100%',
height: 'calc(100dvh - var(--status-bar-height) - 4.25rem)',
maxWidth: '100%',
maxHeight: '100%',
minWidth: '0'
},
showOverlay: true,
direction: 'bottom'
}
: fitPopupElement(modalHTML, device, props.element, contentPanel)
} }
} }