Skip to content

fix: fixes safe area bug#41

Merged
Dhruwang merged 1 commit intomainfrom
fix/safe-area-bug
Feb 17, 2026
Merged

fix: fixes safe area bug#41
Dhruwang merged 1 commit intomainfrom
fix/safe-area-bug

Conversation

@pandeymangg
Copy link
Contributor

Fixes a bug with the ios sdk where the safe area was not ignored
Before:
Screenshot 2026-02-17 at 12 45 00

After:
Screenshot 2026-02-17 at 12 45 12

@pandeymangg pandeymangg requested a review from Dhruwang February 17, 2026 07:15
@coderabbitai
Copy link

coderabbitai bot commented Feb 17, 2026

Walkthrough

Two modifications were made to the web view layout behavior in the FormbricksSDK. In FormbricksView.swift, the .ignoresSafeArea() modifier was added to SurveyWebView to extend content rendering behind the safe area. In SurveyWebView.swift, the WKWebView's scroll view was configured with contentInsetAdjustmentBehavior set to .never to disable automatic content inset adjustments. These changes alter how the web view content is positioned and rendered within the SwiftUI interface.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change: fixing a safe area bug by adding .ignoresSafeArea() modifier and adjusting content inset behavior.
Description check ✅ Passed The description is directly related to the changeset, explaining the safe area bug fix with before/after visual comparisons showing the modal extending properly.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@Sources/FormbricksSDK/WebView/FormbricksView.swift`:
- Around line 9-10: The view currently calls SurveyWebView(surveyId:
viewModel.surveyId, htmlString: htmlString).ignoresSafeArea() which removes all
safe-area handling (including the keyboard) while SurveyWebView also sets
webView.scrollView.contentInsetAdjustmentBehavior = .never, so the system can't
adjust for the keyboard; change the ignoresSafeArea usage to limit it to the
container (e.g., use .ignoresSafeArea(.container)) and/or remove/adjust the
contentInsetAdjustmentBehavior in SurveyWebView (the webView.scrollView) so the
system can perform keyboard avoidance when text inputs are focused.

@sonarqubecloud
Copy link

@Dhruwang Dhruwang enabled auto-merge February 17, 2026 07:23
@Dhruwang Dhruwang added this pull request to the merge queue Feb 17, 2026
Merged via the queue into main with commit 22147fb Feb 17, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants