Skip to content

Bugfix FXIOS-14985 Status bar overlay is strangely animated when we start a search#33046

Draft
MartinP7r wants to merge 2 commits intomozilla-mobile:mainfrom
MartinP7r:32283-fix-status-bar-animation-on-search
Draft

Bugfix FXIOS-14985 Status bar overlay is strangely animated when we start a search#33046
MartinP7r wants to merge 2 commits intomozilla-mobile:mainfrom
MartinP7r:32283-fix-status-bar-animation-on-search

Conversation

@MartinP7r
Copy link
Copy Markdown
Contributor

@MartinP7r MartinP7r commented Apr 13, 2026

📜 Tickets

Jira ticket
Github issue

💡 Description

Fixes the status bar overlay animation artifact that appears when starting a search on iOS 26+.

Root cause: In keyboardWillShowWithState, after the UIView.animate block runs with the keyboard's animation curve (curve 7), subsequent calls to updateToolbarDisplay() get captured by the keyboard's per-thread CATransaction. This causes property changes on the status bar overlay and blur views (UIGlassEffect) to animate with the keyboard's timing, producing a visible left-to-right fill artifact in the status bar area.

Fix: Wrap updateToolbarDisplay() in UIView.performWithoutAnimation within keyboardWillShowWithState, and similarly wrap updateBlurViews()/addOrUpdateMaskViewIfNeeded() in keyboardWillHideWithState. This breaks the leaked animation context so toolbar display updates happen instantly.

Affected code paths:

  • BrowserViewController.keyboardHelper(_:keyboardWillShowWithState:) — wraps updateToolbarDisplay()
  • BrowserViewController.keyboardHelper(_:keyboardWillHideWithState:) — wraps updateBlurViews() + addOrUpdateMaskViewIfNeeded()

🎥 Demos

📝 Checklist

  • I filled in the ticket numbers and a description of my work
  • I updated the PR name to follow our PR naming guidelines
  • I ensured unit tests pass and wrote tests for new code
  • If working on UI, I checked and implemented accessibility (Dynamic Text and VoiceOver)
  • If adding telemetry, I read the data stewardship requirements and will request a data review
  • If adding or modifying strings, I read the guidelines and will request a string review from l10n
  • If needed, I updated documentation and added comments to complex code

…ontext leak into toolbar display

Wrap updateToolbarDisplay() and updateBlurViews()/addOrUpdateMaskViewIfNeeded()
in UIView.performWithoutAnimation within keyboard show/hide handlers. The
keyboard's animation curve (curve 7) creates a per-thread CATransaction that
captures subsequent property changes, causing a visible left-to-right fill
artifact in the status bar overlay's UIGlassEffect on iOS 26+.
@lmarceau lmarceau marked this pull request as ready for review April 13, 2026 14:56
@lmarceau lmarceau requested a review from a team as a code owner April 13, 2026 14:56
@lmarceau lmarceau requested review from cyndichin and yoanarios April 13, 2026 14:56
@mobiletest-ci-bot
Copy link
Copy Markdown

Messages
📖 Project coverage: 41.05%

🧹 Tidy commit

Just 1 file(s) touched. Thanks for keeping it clean and review-friendly!

💬 Description craftsman

Great PR description! Reviewers salute you 🫡

🦊 BrowserViewController Check

We’re tracking the size of BrowserViewController.swift to keep it healthy.

  • ✨ Change in file size: +10 lines

✅ New file code coverage

No new file detected so code coverage gate wasn't ran.

Client.app: Coverage: 39.42

File Coverage
BrowserViewController.swift 34.54% ⚠️

Generated by 🚫 Danger Swift against 26fd4dd

@yoanarios yoanarios changed the title Bugfix #32283 [Status bar] Prevent keyboard animation leak on search Bugfix FXIOS-14985 Status bar overlay is strangely animated when we start a search Apr 14, 2026
// from leaking into updateToolbarDisplay. Without this, the keyboard's
// animation curve captures property changes on the status bar overlay and
// blur views, causing a visible left-to-right fill artifact with UIGlassEffect
// on iOS 26+. (See: https://github.com/nickmilo/firefox-ios/issues/32283)
Copy link
Copy Markdown
Contributor

@yoanarios yoanarios Apr 14, 2026

Choose a reason for hiding this comment

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

nit: The link leads to a page not found 404 so I suggest to remove it

Suggested change
// on iOS 26+. (See: https://github.com/nickmilo/firefox-ios/issues/32283)
// on iOS 26+.

Copy link
Copy Markdown
Contributor

@yoanarios yoanarios left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution, tested and I can't reproduce the issue and I couldn't find other bugs just waiting on a nit

@MartinP7r MartinP7r marked this pull request as draft April 15, 2026 11:37
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.

3 participants