Skip to content

Bugfix: Clear focused views when FocusState becomes false - #552

Merged
fhasse95 merged 1 commit into
skiptools:mainfrom
fhasse95:clear-focus-state
Oct 5, 2026
Merged

fhasse95 merged 1 commit into
skiptools:mainfrom
fhasse95:clear-focus-state

Conversation

@fhasse95

@fhasse95 fhasse95 commented Oct 4, 2026

Copy link
Copy Markdown
Member

This PR fixes focus clearing for SkipUI views on Android.

Previously, .focused(...) requested focus when the bound value matched, but it did not clear the native Compose focus when the bound value changed away from the focused value. This could leave text fields focused even after setting a FocusState<Bool> binding to false.

The focus modifier now tracks whether the view is currently focused and clears the Compose focus manager when the binding no longer matches.


Thank you for contributing to the Skip project! Please review the contribution guide at https://skip.dev/docs/contributing/ for advice and guidance on making high-quality PRs.

Use this space to describe your change and add any labels (bug, enhancement, documentation, etc.) to help categorize your contribution.

Skip Pull Request Checklist:

  • REQUIRED: I have signed the Contributor Agreement
  • REQUIRED: I have tested my change locally with swift test
  • OPTIONAL: I have tested my change on an iOS simulator or device
  • OPTIONAL: I have tested my change on an Android emulator or device
  • REQUIRED: I have checked whether this change requires a corresponding update in the Skip Fuse UI repository (link related PR if applicable)
  • OPTIONAL: I have added an example of any UI changes to the Showcase sample app

  • AI was used to generate or assist with generating this PR. Please specify below how you used AI to help you, and what steps you have taken to manually verify the changes.

@cla-bot cla-bot Bot added the cla-signed label Oct 4, 2026
@fhasse95
fhasse95 merged commit a4550d1 into skiptools:main Oct 5, 2026
2 checks passed
@fhasse95
fhasse95 deleted the clear-focus-state branch October 5, 2026 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant