fix: restore touch pass-through for no-overlay surveys - #46
Merged
Conversation
The card-geometry probe matched `#fbjs [role="dialog"][aria-modal="true"]`. The surveys runtime now sets `aria-modal` only when a survey has a backdrop, so the selector matched nothing in exactly the no-overlay case the pointer mask exists for. `fbCardRect()` returned null forever, the reported rect stayed null, and `_RenderPointerMask` rejected pointers across the whole WebView — the survey card became untappable. Match on `role="dialog"` alone. It is on the card in every overlay mode, and scoping to `#fbjs` still keeps the probe off the full-screen wrapper. The runtime is loaded from the server at render time, so this reached every host on a current server without an SDK release. Nothing here can be covered by a test: the probe is a JS string inside Dart that the widget tests never execute (they inject the geometry event directly). The broken state was reproduced by hand on a local host app; the fix needs the same check before merge.
Contributor
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Team Run ID: Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Dhruwang
approved these changes
Sep 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What & why
Was: an app survey with
overlay: nonerendered a card that could not be tapped at all. Not the old "host app is frozen" bug — the card itself was dead, so the survey was unusable and undismissable except by finishing the host flow.Now: the card takes touches again, and taps outside it still pass through to the host app.
The card-geometry probe matched
#fbjs [role="dialog"][aria-modal="true"]. The surveys runtime now setsaria-modalonly when a survey has a backdrop (monorepo PR formbricks/formbricks#8804), so the selector matched nothing in exactly the no-overlay case the pointer mask exists for.fbCardRect()returned null forever, the reported rect stayed null, and_RenderPointerMaskrejected pointers across the whole WebView.Fix is to match
role="dialog"alone — it is on the card in every overlay mode, and scoping to#fbjsstill keeps the probe off the full-screen wrapper.The runtime is fetched from the server at render time, so this landed on every host pointed at a current server with no SDK release involved. It has been live since that monorepo PR deployed.
Where to look
packages/formbricks/lib/src/widgets/survey_html.dart— the selector, and a comment recording whyaria-modalmust not be matched.Coverage
packages/formbricks/test/widgets/survey_webview_test.dart, 73 passRerun:
cd packages/formbricks && flutter test test/widgets/Open gaps
No test can fail on this. The probe is a JS string inside Dart that the widget tests never execute — they inject the geometry event directly, so the selector itself is only ever exercised at runtime. The durable fix is to have the surveys renderer emit the card rect over a stable contract so no SDK scrapes the DOM; that is follow-up work in the monorepo and would cover iOS and React Native too, both of which still block host touches entirely.
Breaking changes
Restores intended behaviour on a public API that did not change.