Flip order of accommodation for (#115)
All checks were successful
ci/woodpecker/pr/woodpecker Pipeline was successful

This commit is contained in:
David 2022-08-05 17:01:18 -07:00
parent 3eab17330b
commit d69df0e906

View file

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