From d69df0e906554c49ba609a1d2c2153a358710c81 Mon Sep 17 00:00:00 2001 From: David Date: Fri, 5 Aug 2022 17:01:18 -0700 Subject: [PATCH] Flip order of accommodation for (#115) --- src/components/emoji_input/emoji_input.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/components/emoji_input/emoji_input.js b/src/components/emoji_input/emoji_input.js index 391cc5b5..78e75880 100644 --- a/src/components/emoji_input/emoji_input.js +++ b/src/components/emoji_input/emoji_input.js @@ -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' }