fix: prevent text fields from auto-focusing on screen load#3857
Merged
Conversation
Fixes issue where TextFields in node list (filter) and node detail (notes) would automatically steal focus and show keyboard when screens load. Root causes identified: 1. AnimatedPane in ListDetailPaneScaffold gives focus to the first focusable element during pane animation/transition (standard Android navigation behavior) 2. Frequent recompositions in stickyHeader (due to scroll animations) can trigger TextField focus requests 3. Android's focus system automatically assigns focus to the first focusable element when entering a new screen Comprehensive solution applied: 1. Clear focus after AnimatedPane composition (AdaptiveNodeListScreen) 2. Make parent containers (Box/Column) focusable so they receive initial focus instead of TextFields (NodeListScreen, NodeDetailList) This multi-layer defense ensures TextFields cannot steal focus from multiple sources while preserving normal user interaction.
jamesarich
approved these changes
Nov 29, 2025
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #3857 +/- ##
========================================
- Coverage 0.53% 0.53% -0.01%
========================================
Files 390 390
Lines 22846 22850 +4
Branches 2889 2889
========================================
Hits 122 122
- Misses 22703 22707 +4
Partials 21 21 ☔ View full report in Codecov by Sentry. |
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.
Closes #3856