Skip to content

Commit d8ed194

Browse files
authored
fix: fixes android pointer events bug (#43)
* fixes android pointer events bug * fixes comment * fix * fix
1 parent 529055a commit d8ed194

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

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

Lines changed: 7 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,10 @@ 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 fix Android touch event handling.
44+
return survey ? (
45+
<View pointerEvents="box-none">
46+
<SurveyWebView survey={survey} />
47+
</View>
48+
) : null;
4349
}

sonar-project.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ sonar.javascript.lcov.reportPaths=packages/react-native/coverage/lcov.info
1818
sonar.typescript.tsconfigPath=packages/react-native/tsconfig.json,apps/playground/tsconfig.json
1919

2020
# Coverage settings
21-
sonar.coverage.exclusions=**/node_modules/**,**/dist/**,**/build/**,**/coverage/**,**/.turbo/**,**/apps/playground/**,**/*.config.js,**/*.config.ts,**/vite.config.ts,**/vitest.setup.ts,**/tsconfig.json,**/package.json,**/pnpm-lock.yaml,**/turbo.json,**/pnpm-workspace.yaml
21+
sonar.coverage.exclusions=**/node_modules/**,**/dist/**,**/build/**,**/coverage/**,**/.turbo/**,**/apps/playground/**,**/*.config.js,**/*.config.ts,**/vite.config.ts,**/vitest.setup.ts,**/tsconfig.json,**/package.json,**/pnpm-lock.yaml,**/turbo.json,**/pnpm-workspace.yaml,**/*.tsx

0 commit comments

Comments
 (0)