mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-13 19:58:09 +00:00
Fixed Filter popup (#2481)
Signed-off-by: Alexander Platov <sas_lord@mail.ru>
This commit is contained in:
parent
562c9d1082
commit
fedc8fb21a
@ -184,14 +184,14 @@ export function fitPopupPositionedElement (
|
||||
direction = alignment.position.v + '|' + alignment.position.h
|
||||
} else {
|
||||
// Vertical
|
||||
if (rect.bottom + rectPopup.height + 28 <= document.body.clientHeight) {
|
||||
if (rect.bottom + rectPopup.height + 28 <= docHeight) {
|
||||
newProps.top = `${rect.bottom + 1}px`
|
||||
direction = 'bottom'
|
||||
} 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'
|
||||
} else {
|
||||
newProps.top = modalHTML.style.bottom = '16px'
|
||||
newProps.top = newProps.bottom = '16px'
|
||||
direction = 'top'
|
||||
}
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
import { Class, Doc, FindResult, getObjectValue, Ref, SortingOrder } from '@hcengineering/core'
|
||||
import { translate } from '@hcengineering/platform'
|
||||
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 { onMount } from 'svelte'
|
||||
import { getPresenter } from '../../utils'
|
||||
@ -111,7 +111,7 @@
|
||||
const dispatch = createEventDispatcher()
|
||||
|
||||
onMount(() => {
|
||||
if (searchInput) searchInput.focus()
|
||||
if (searchInput && !$deviceOptionsStore.isMobile) searchInput.focus()
|
||||
})
|
||||
getValues(search)
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user