From 551d5a02ca676840436c0c111c2818098e0e5c59 Mon Sep 17 00:00:00 2001 From: orfelorfel23 Date: Sat, 13 Jun 2026 00:04:02 +0200 Subject: [PATCH] Fix: Sticker selection via tap works now, prevents event bubbling to canvas --- src/components/DraggableSticker.tsx | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/src/components/DraggableSticker.tsx b/src/components/DraggableSticker.tsx index ffdaa7a5..9377c718 100644 --- a/src/components/DraggableSticker.tsx +++ b/src/components/DraggableSticker.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'; +import { StyleSheet, Text, View, TouchableWithoutFeedback } from 'react-native'; import { Gesture, GestureDetector } from 'react-native-gesture-handler'; import Animated, { useSharedValue, @@ -104,13 +104,7 @@ export default function DraggableSticker({ ); }); - const tapGesture = Gesture.Tap() - .onEnd(() => { - runOnJS(selectSticker)(); - }); - - const composedDrag = Gesture.Simultaneous(panGesture, pinchGesture, rotationGesture); - const gesture = Gesture.Exclusive(composedDrag, tapGesture); + const gesture = Gesture.Simultaneous(panGesture, pinchGesture, rotationGesture); const animatedStyle = useAnimatedStyle(() => ({ transform: [ @@ -126,13 +120,17 @@ export default function DraggableSticker({ return ( - {isText ? ( - - {sticker.content} + + + {isText ? ( + + {sticker.content} + + ) : ( + {sticker.content} + )} - ) : ( - {sticker.content} - )} + );