Skip to content

Commit 4339534

Browse files
committed
fixes android pointer events bug
1 parent 529055a commit 4339534

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

packages/react-native/src/components/formbricks.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import { Logger } from "@/lib/common/logger";
33
import { setup } from "@/lib/common/setup";
44
import { SurveyStore } from "@/lib/survey/store";
55
import React, { useCallback, useEffect, useSyncExternalStore } from "react";
6+
import { View } from "react-native";
67

78
interface FormbricksProps {
89
appUrl: string;
@@ -39,5 +40,12 @@ export function Formbricks({ appUrl, environmentId }: FormbricksProps): React.JS
3940
const getSnapshot = useCallback(() => surveyStore.getSurvey(), []);
4041
const survey = useSyncExternalStore(subscribe, getSnapshot);
4142

42-
return survey ? <SurveyWebView survey={survey} /> : null;
43+
// Wrap in View with pointerEvents="box-none" to allow touches to pass through
44+
// on Android when the survey is not visible or in transparent areas.
45+
// Issue reference: https://github.com/formbricks/react-native/issues/23
46+
return (
47+
<View pointerEvents="box-none">
48+
{survey ? <SurveyWebView survey={survey} /> : null}
49+
</View>
50+
);
4351
}

0 commit comments

Comments
 (0)