diff --git a/packages/formbricks/CHANGELOG.md b/packages/formbricks/CHANGELOG.md index 2c2a6d5..ce80ce4 100644 --- a/packages/formbricks/CHANGELOG.md +++ b/packages/formbricks/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## 1.1.1 + +- Fix survey cards being untappable when the survey has no backdrop. The + card-geometry probe required `aria-modal`, which the surveys runtime now sets + only for surveys that have one. With no rect to work from, the pointer mask + rejected touches across the whole WebView instead of only outside the card. + The runtime is served at render time, so hosts on a current server hit this + without changing SDK version. + ## 1.1.0 - Support survey-interaction segment filters: segments that target contacts by diff --git a/packages/formbricks/lib/src/widgets/survey_html.dart b/packages/formbricks/lib/src/widgets/survey_html.dart index 64e491b..2bcf97a 100644 --- a/packages/formbricks/lib/src/widgets/survey_html.dart +++ b/packages/formbricks/lib/src/widgets/survey_html.dart @@ -153,12 +153,18 @@ String buildSurveyHtml(SurveyHtmlOptions options) { var fbGeometryRaf = null; var fbGeometryStable = 0; function fbCardRect() { - // The survey card is the single modal dialog the runtime renders inside - // its #fbjs container (survey-container.tsx). Scoped + both attributes - // so we never grab the full-screen #fbjs wrapper (that would defeat - // box-none) or a future nested dialog. querySelector returns the - // outermost match in document order, i.e. the card itself. - var el = document.querySelector('#fbjs [role="dialog"][aria-modal="true"]'); + // The survey card is the single dialog the runtime renders inside its + // #fbjs container (survey-container.tsx). Scoped to #fbjs so we never + // grab the full-screen wrapper (that would defeat box-none); + // querySelector returns the outermost match in document order, i.e. + // the card itself. + // + // Deliberately NOT matched on aria-modal. The runtime sets that + // attribute only when the survey has a backdrop (ENG-2304), so + // requiring it matched nothing in exactly the no-overlay case this + // mask exists for -- the rect stayed null and the card became + // untappable. Match on role alone: it is on the card in every mode. + var el = document.querySelector('#fbjs [role="dialog"]'); if (!el) return null; var r = el.getBoundingClientRect(); if (r.width <= 0 || r.height <= 0) return null; diff --git a/packages/formbricks/pubspec.yaml b/packages/formbricks/pubspec.yaml index c8b5247..6a357b5 100644 --- a/packages/formbricks/pubspec.yaml +++ b/packages/formbricks/pubspec.yaml @@ -2,7 +2,7 @@ name: formbricks description: >- Formbricks Flutter SDK — connect your Flutter app to Formbricks, identify users, track actions, and render targeted in-app surveys. -version: 1.1.0 +version: 1.1.1 homepage: https://formbricks.com repository: https://github.com/formbricks/flutter issue_tracker: https://github.com/formbricks/flutter/issues