From 22eb27fe8efb6111a19ad9b2b0abc15f38ceff1f Mon Sep 17 00:00:00 2001 From: s-alves10 Date: Wed, 9 Aug 2023 10:39:36 -0500 Subject: [PATCH 1/4] fix: prevent elastic scrolling when emoji picker is opened --- src/components/EmojiPicker/EmojiPickerMenu/index.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/components/EmojiPicker/EmojiPickerMenu/index.js b/src/components/EmojiPicker/EmojiPickerMenu/index.js index dfa06e8daab2..86902b39b133 100755 --- a/src/components/EmojiPicker/EmojiPickerMenu/index.js +++ b/src/components/EmojiPicker/EmojiPickerMenu/index.js @@ -524,6 +524,9 @@ class EmojiPickerMenu extends Component { render() { const isFiltered = this.emojis.length !== this.state.filteredEmojis.length; + const listStyle = StyleUtils.getEmojiPickerListHeight(isFiltered, this.props.windowHeight); + const height = (!listStyle.maxHeight || listStyle.height < listStyle.maxHeight) ? listStyle.height : listStyle.maxHeight; + const overflowLimit = Math.floor(height / CONST.EMOJI_PICKER_ITEM_HEIGHT) * 8; return (