Fix tap-status-bar-to-scroll when global Toolbar is in use (#3589)#4814
Merged
Conversation
Toolbar.initTitleBarStatus created a plain Container as the StatusBar, ignoring statusBarScrollsUpBool. With the global Toolbar (the modern default), the iOS fake tap forwarded by cn1StatusBarTapProxy at (width/2, 0) landed on a non-clickable Container, so scroll-to-top never fired. Mirror Form.createStatusBar by creating a Button with the scroll-to-top listener when statusBarScrollsUpBool is true. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
✅ Continuous Quality ReportTest & Coverage
Static Analysis
Generated automatically by the PR CI workflow. |
Collaborator
|
Compared 37 screenshots: 37 matched. Native Android coverage
✅ Native Android screenshot tests passed. Native Android coverage
Benchmark ResultsDetailed Performance Metrics
|
Collaborator
2 tasks
liannacasper
pushed a commit
that referenced
this pull request
Apr 26, 2026
The previous fix attempt ran into a compile error because Component.setSafeArea does not exist - setSafeArea is only defined on Container. Replacing the StatusBar Container with a Button (as #4814 did) therefore drops safe-area support entirely, which is what made 36 of 37 iOS screenshot baselines diverge. Keep the StatusBar as a Container (so setSafeArea(true) and the StatusBar UIID styling continue to apply unchanged), and attach a pointer-released listener to it for the scroll-to-top behavior #4814 introduced. The synthetic iOS tap forwarded by cn1StatusBarTapProxy still fires Component.pointerReleased, which dispatches to that listener. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
liannacasper
added a commit
that referenced
this pull request
Apr 26, 2026
…sion) (#4815) * Toolbar: restore setSafeArea on StatusBar button branch (#4814 regression) The fix in #4814 wrapped the StatusBar component creation in an if/else but only set setSafeArea(true) on the Container fallback. With the default statusBarScrollsUpBool=true the new Button branch ran without safe-area treatment, so the iOS top inset was no longer reserved and every form shifted vertically. iOS screenshot tests caught this: 36 of 37 baselines diverged on the merge commit. Move setSafeArea(true) below the if/else so it applies to both the Button and Container cases, matching the pre-#4814 behavior. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Toolbar: keep StatusBar as a Container to preserve safeArea behavior The previous fix attempt ran into a compile error because Component.setSafeArea does not exist - setSafeArea is only defined on Container. Replacing the StatusBar Container with a Button (as #4814 did) therefore drops safe-area support entirely, which is what made 36 of 37 iOS screenshot baselines diverge. Keep the StatusBar as a Container (so setSafeArea(true) and the StatusBar UIID styling continue to apply unchanged), and attach a pointer-released listener to it for the scroll-to-top behavior #4814 introduced. The synthetic iOS tap forwarded by cn1StatusBarTapProxy still fires Component.pointerReleased, which dispatches to that listener. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Shai Almog <67850168+shai-almog@users.noreply.github.com> Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.





































Summary
Toolbarwas in use, even withpaintsTitleBarBoolandstatusBarScrollsUpBoolenabled.Toolbar.initTitleBarStatus()created a plainContaineras the StatusBar component and never honoredstatusBarScrollsUpBool. The iOS native shim (cn1StatusBarTapProxy) forwards a fake tap at(displayWidth/2, 0), but with noButtonto receive it, nothing scrolled.Form.createStatusBar(): whenstatusBarScrollsUpBoolis true (default), it creates aButtonwhose action listener callsfindScrollableChild(...)+scrollRectToVisible(...). When the constant is false, the legacy plain-Containerbehavior is preserved.Form.findScrollableChild(...)is package-private andToolbarshares the package.Test plan
paintsTitleBarBool: trueandstatusBarScrollsUpBool: true, default global Toolbar, scrollable content (≥ a screenful).statusBarScrollsUpBool: false: tap does not scroll, layout/sizing unchanged.Form.createStatusBar).🤖 Generated with Claude Code