-
Notifications
You must be signed in to change notification settings - Fork 53
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
We have a new regression that popped up just after upgrading to Datadog 2.14.0. We have an Touch Overlay (gesture tracker that shows where user makes a touch) and it breaks after the recent update to Datadog Webview.
Reproduction steps
- Wrap a
DatadogWebViewwith a gesture handler usingGesture.Manual() - Use
Gesture.Simultaneous()to allow both the gesture and WebView to receive touches - Navigate within the WebView to make it interactive
- Touch and drag on the WebView
Expected Behavior
onTouchesDownfires when touch startsonTouchesMovefires during dragonTouchesUpfires when touch ends
Actual Behavior
onTouchesDownfires when touch startsonTouchesMovefires briefly (sometimes)onTouchesCancelledfires almost immediately (within ~6ms based on animation progress)onTouchesUpnever fires
Minimal Reproduction Code
import WebView from "@datadog/mobile-react-native-webview";
import { Gesture, GestureDetector, GestureHandlerRootView } from "react-native-gesture-handler";
import { View } from "react-native";
const TouchOverlay = ({ children }) => {
const overlayGesture = Gesture.Manual()
.shouldCancelWhenOutside(false)
.onTouchesDown((event) => {
console.log("[TouchOverlay] onTouchesDown", event.allTouches.length);
})
.onTouchesMove((event) => {
console.log("[TouchOverlay] onTouchesMove");
})
.onTouchesUp((event) => {
// This never fires when WebView is interactive
console.log("[TouchOverlay] onTouchesUp");
})
.onTouchesCancelled((event) => {
// This fires instead of onTouchesUp
console.log("[TouchOverlay] onTouchesCancelled");
});
const scrollGesture = Gesture.Native();
const combinedGesture = Gesture.Simultaneous(scrollGesture, overlayGesture);
return (
<GestureHandlerRootView style={{ flex: 1 }}>
<GestureDetector gesture={combinedGesture}>
<View style={{ flex: 1 }}>
{children}
</View>
</GestureDetector>
</GestureHandlerRootView>
);
};
// Usage
const App = () => (
<TouchOverlay>
<WebView source={{ uri: "https://example.com" }} />
</TouchOverlay>
);Workaround
Using the standard react-native-webview instead of @datadog/mobile-react-native-webview resolves the issue. Touch gestures work correctly with the non-Datadog WebView.
// This works correctly
import WebView from "react-native-webview";Console Logs
Before WebView interaction (working correctly):
[TouchOverlay] onTouchesDown
[TouchOverlay] onTouchesMove (multiple times)
[TouchOverlay] onTouchesUp ✅
After WebView becomes interactive (broken):
[TouchOverlay] onTouchesDown
[TouchOverlay] onTouchesMove (0-2 times)
[TouchOverlay] onTouchesCancelled ❌ (onTouchesUp never fires)
SDK logs
No response
Expected behavior
No response
Affected SDK versions
2.14.0
Latest working SDK version
2.13.2
Did you confirm if the latest SDK version fixes the bug?
Yes
Integration Methods
Yarn
React Native Version
0.81.5, Expo 54
Package.json Contents
react-native-gesture-handler: 2.20.2
iOS Setup
No response
Android Setup
No response
Device Information
iPhone 17 Pro, iOS 26.2
Other relevant information
No response
pablopunk
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working