mirror of
https://github.com/hcengineering/platform.git
synced 2025-04-29 03:34:31 +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
|
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'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user