onLongPress doesnt work on MessageImage
See original GitHub issueIssue Description
I have a chat where a user can send images and text. I added the onLongPress
handler on GiftedChat, it works great for text, but doesnt work for images.
Steps to Reproduce / Code Snippets
Add an image in the chat. Hold long on the image, the onLongPress
wont be called.
Expected Results
onLongPress
handler will be called for MessageImage
same as it is called for MessageText
Additional Information
- Nodejs version: 14.11.0
- React version: 16.9.0
- React Native version: 0.61.5
- react-native-gifted-chat version: 0.11.3
- Platform(s) (iOS, Android, or both?): both
- TypeScript version: 3.9.3
Issue Analytics
- State:
- Created 3 years ago
- Comments:7
Top Results From Across the Web
Issue with messages rendering a view specific to onLongPress
I am trying to render a View through renderCustomView={this.displayEmojis} for an individual message once a user has activated the ...
Read more >onLongPress prop not working for image messages #577
While trying to perform onLongPress for messages with image, only react-native-lightbox functions triggers. Is there a work around for this?
Read more >Supporting Both Tap and Long Press on a Button in SwiftUI
Now the button tap works again — unfortunately the long-press gesture doesn't work anymore. OK, let's use simultaneousGesture to tell SwiftUI that we...
Read more >Message Components — Stream Chat React Native - Docs
The Message component is the high level component that deals with all the message logic. It doesn't implement any rendering, but delegates that...
Read more >Drag and drop UI elements in Flutter with Draggable and ...
Dropping an item on the DragTarget widget; Making UI elements draggable on long-press with LongPressDraggable; Flutter drag-and-drop example: ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can pass
imageProps
like:in my case i have a custom image modal viewer (no built in LightBox)
react-native-image-zoom-viewer
:and outside of
<GiftedChat>...</GiftedChat>
i present the modal:@efstathiosntonas Thanks a ton ! U saved me!