Flip order of accommodation for (#115) #118

Merged
floatingghost merged 1 commit from Mergan/pleroma-fe:emoji-picker into develop 2022-08-11 10:08:12 +00:00
Showing only changes of commit d69df0e906 - Show all commits

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'
}