TheWidlarzGroup / rn-emoji-keyboard

Super performant, lightweight, fully customizable emoji picker 🚀
https://thewidlarzgroup.github.io/rn-emoji-keyboard/
MIT License
323 stars 55 forks source link

Category scroll gesture doesn't work with plain EmojiKeyboard and enableCategoryChangeGesture #157

Closed MarceloPrado closed 8 months ago

MarceloPrado commented 8 months ago

Describe the bug Hi folks! I noticed the scroll gesture for each category doesn't work when using the plain EmojiKeyboard (no modal) and enableCategoryChangeGesture. See screenshots for more.

To Reproduce Wrap the EmojiKeyboard in a BottomSheet, similar to:

<BottomSheet
    index={0}
    snapPoints={['60%']}
  >
    <EmojiKeyboard
      disableSafeArea
      enableCategoryChangeAnimation
      enableCategoryChangeGesture={false}
      enableSearchAnimation={false}
      enableSearchBar
      onEmojiSelected={handleEmojiSelected}
      styles={emojiKeyboardStyles}
    />
</BottomSheet>

Unfortunately my bandwidth is short to create a full working repro, but lmk if you have troubles reproing.

Expected behavior I can scroll vertically through a category, without EmojiKeyboard attempting to change the focused category.

Screenshots

With enableCategoryChangeGesture={true} Vertical scroll doesn't work, it tries to change categories:

https://github.com/TheWidlarzGroup/rn-emoji-keyboard/assets/8047841/c9169b2a-3971-4bb9-a391-1d4b6a2a4d49

With enableCategoryChangeGesture={false} Vertical scroll works as expected https://github.com/TheWidlarzGroup/rn-emoji-keyboard/assets/8047841/68d04c71-7deb-4ad8-bb8e-ef60bab45a1d

Additional context Add any other context about the problem here.

jakex7 commented 8 months ago

Hi @MarceloPrado, Thanks for reporting that. I've figured that the problem is not the modal itself, but a horizontal margin added on the parent of EmojiKeyboard component. A temporary solution may be to remove the extra margin on the modal (of course, I guess that this is not the best advice 🙈), meanwhile, we will definitely take a closer look at this issue and try to fix it in the next release.

jakex7 commented 8 months ago

Hello @MarceloPrado, This issue has been fixed and released in version 1.6.0. Could you please update the lib and let me know if everything is working properly now?