Fixed Filter popup (#2481)

Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
Alexander Platov 2022-12-28 20:10:53 +03:00 committed by GitHub
parent 562c9d1082
commit fedc8fb21a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -184,14 +184,14 @@ export function fitPopupPositionedElement (
direction = alignment.position.v + '|' + alignment.position.h direction = alignment.position.v + '|' + alignment.position.h
} else { } else {
// Vertical // Vertical
if (rect.bottom + rectPopup.height + 28 <= document.body.clientHeight) { if (rect.bottom + rectPopup.height + 28 <= docHeight) {
newProps.top = `${rect.bottom + 1}px` newProps.top = `${rect.bottom + 1}px`
direction = 'bottom' direction = 'bottom'
} else if (rectPopup.height + 28 < rect.top) { } else if (rectPopup.height + 28 < rect.top) {
newProps.bottom = `${document.body.clientHeight - rect.top + 1}px` newProps.bottom = `${docHeight - rect.top + 1}px`
direction = 'top' direction = 'top'
} else { } else {
newProps.top = modalHTML.style.bottom = '16px' newProps.top = newProps.bottom = '16px'
direction = 'top' direction = 'top'
} }

View File

@ -16,7 +16,7 @@
import { Class, Doc, FindResult, getObjectValue, Ref, SortingOrder } from '@hcengineering/core' import { Class, Doc, FindResult, getObjectValue, Ref, SortingOrder } from '@hcengineering/core'
import { translate } from '@hcengineering/platform' import { translate } from '@hcengineering/platform'
import presentation, { getClient } from '@hcengineering/presentation' import presentation, { getClient } from '@hcengineering/presentation'
import ui, { Button, CheckBox, Label, Loading, resizeObserver } from '@hcengineering/ui' import ui, { Button, CheckBox, Label, Loading, resizeObserver, deviceOptionsStore } from '@hcengineering/ui'
import { Filter } from '@hcengineering/view' import { Filter } from '@hcengineering/view'
import { onMount } from 'svelte' import { onMount } from 'svelte'
import { getPresenter } from '../../utils' import { getPresenter } from '../../utils'
@ -111,7 +111,7 @@
const dispatch = createEventDispatcher() const dispatch = createEventDispatcher()
onMount(() => { onMount(() => {
if (searchInput) searchInput.focus() if (searchInput && !$deviceOptionsStore.isMobile) searchInput.focus()
}) })
getValues(search) getValues(search)
</script> </script>