Skip to content

Clear iOS text selection after resigning focus - #70

Open
arthurgarzajr wants to merge 1 commit into
gonzalezreal:mainfrom
arthurgarzajr:codex/clear-selection-on-resign
Open

Clear iOS text selection after resigning focus#70
arthurgarzajr wants to merge 1 commit into
gonzalezreal:mainfrom
arthurgarzajr:codex/clear-selection-on-resign

Conversation

@arthurgarzajr

@arthurgarzajr arthurgarzajr commented Jun 24, 2026

Copy link
Copy Markdown

Problem

On iOS, selected Textual content can remain highlighted after focus moves into another input, such as a text field or composer. Copying selected text should continue to leave the selection intact, but once the interaction view resigns first responder because another control becomes active, the stale selection should be cleared.

Fix

This clears model.selectedRange from UITextInteractionView.resignFirstResponder() after super.resignFirstResponder() succeeds. That keeps copy/share behavior unchanged while tying selection cleanup to the UIKit focus lifecycle.

The change is scoped to UIKit because this issue is caused by UIKit first-responder focus changes. AppKit uses a separate selection interaction path, so this PR leaves macOS behavior unchanged.

Validation

  • make test-ios

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.

1 participant