Bugfix FXIOS-16741 [Toolbar] - Weird behavior of the toolbar - #35505
Open
yoanarios wants to merge 4 commits into
Open
Bugfix FXIOS-16741 [Toolbar] - Weird behavior of the toolbar#35505yoanarios wants to merge 4 commits into
yoanarios wants to merge 4 commits into
Conversation
💪 Quality guardian2 tests files modified. You're a champion of test coverage! 🚀 🧹 Tidy commitJust 3 file(s) touched. Thanks for keeping it clean and review-friendly! 💬 Description craftsmanGreat PR description! Reviewers salute you 🫡 ✅ Code coverage
ToolbarKit: Coverage: 75.95
Generated by 🚫 Danger Swift against bb252b0 |
ih-codes
reviewed
Sep 2, 2026
ih-codes
left a comment
Contributor
There was a problem hiding this comment.
For posterity: I tested this out today. As discussed over DM, there was a bit of an editing state regression. With the changes to locationTextFieldDidBeginEditing, enterOverlayMode now fires the didStartEditingUrl action when tapping a top site, which causes the keyboard to open after navigating away from a Home new tab to a top site website. @yoanarios will be looking tomorrow. 🙏
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.
📜 Tickets
Jira ticket
Github issue
💡 Description
Cause: PR #35292 (FXIOS-16590, "Migrate keyboardStateDidChange to ToolbarModernAction") replaced a single generic, bidirectional legacy action:
keyboardStateDidChange, which any call site could dispatch with shouldShowKeyboard: true or false, with several narrower, one-directional modern actions (didCancelKeyboardRequest,accessoryViewVisibilityChanged) that only ever set it to false, and hardcodedcancelEditOnHomepage's branch to unconditionally false too. That was a reasonable simplification for the cases the refactor targeted, but it quietly removed the only remaining path that could set shouldShowKeyboard back to true outside of a genuinely fresh begin-edit (didStartEditingUrl/didPasteSearchTerm).Resuming an edit after the keyboard was dismissed mid-session (e.g. scrolling the homepage while the Cancel button is still showing) is neither a fresh begin-edit nor one of the new actions' triggers — so once the generic restore-to-true mechanism was gone, there was no path left for that specific transition. It surfaced because
LocationView.locationTextFieldDidBeginEditingalready early-returns when isEditing is already true (to skip redundant setup), silently swallowing the one call that would have re-dispatched didStartEditingUrl. That guard itself is old and untouched by the refactor, it just went from "harmless, because something else could still restore the keyboard" to "the single point of failure," once the refactor deleted the other path.Fix:
locationTextFieldDidBeginEditingnow always notifies the delegate, reusing the existingdidStartEditingUrldispatch (which already sets shouldShowKeyboard: true) instead of adding a new action or delegate method. It still skips the cosmetic text/attributedText reset when already editing, so nothing about the normal fresh-edit flow changes.Add unit test
📝 Checklist