Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/formbricks/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
18 changes: 12 additions & 6 deletions packages/formbricks/lib/src/widgets/survey_html.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion packages/formbricks/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down