Merge pull request 'Flip order of accommodation for (#115)' (#118) from Mergan/pleroma-fe:emoji-picker into develop
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

Reviewed-on: AkkomaGang/pleroma-fe#118
This commit is contained in:
floatingghost 2022-08-11 10:08:12 +00:00
commit 75a3ab343b

View file

@ -491,11 +491,10 @@ const EmojiInput = {
}, },
setPlacement (container, target, offsetBottom) { setPlacement (container, target, offsetBottom) {
if (!container || !target) return if (!container || !target) return
if (this.placement === 'bottom' || (this.placement === 'auto' && !this.overflowsBottom(container))) {
target.style.top = offsetBottom + 'px' target.style.top = offsetBottom + 'px'
target.style.bottom = 'auto' target.style.bottom = 'auto'
} else {
if (this.placement === 'top' || (this.placement === 'auto' && this.overflowsBottom(container))) {
target.style.top = 'auto' target.style.top = 'auto'
target.style.bottom = this.input.offsetHeight + 'px' target.style.bottom = this.input.offsetHeight + 'px'
} }