Skip to content

Conversation

@cxa
Copy link

@cxa cxa commented Jun 9, 2025

as commit message

@CLAassistant
Copy link

CLAassistant commented Jun 9, 2025

CLA assistant check
All committers have signed the CLA.


open override var canBecomeFirstResponder: Bool {
!isFirstResponder && isEditable
!isFirstResponder
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
!isFirstResponder
!isFirstResponder && isSelectable

do you think it should check for isSelectable? That condition would match the Mac version

Copy link
Author

@cxa cxa Jun 9, 2025

Choose a reason for hiding this comment

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

With !isFirstResponder && isSelectable, you can't edit under this case:

textView.isEditable = true
textView.isSelectable = false

So I suggest

!isFirstResponder && (isEditable || isSelectable)

But the problem is, you can't avoid selection under this case with above logic:

textView.isEditable = true
textView.isSelectable = false

Maybe we should add some documentation to clarify that when isEditable = true, isSelectable will be ignored.

@cxa cxa force-pushed the uikit-selectable-fix branch from 9e51584 to fabc69e Compare June 9, 2025 13:42
@cxa
Copy link
Author

cxa commented Jun 13, 2025

Closed due to uncertainty.

@cxa cxa closed this Jun 13, 2025
@krzyzanowskim
Copy link
Owner

don’t close it yet. we need that. I didn’t have time to test it

@krzyzanowskim krzyzanowskim reopened this Jun 13, 2025
@cxa
Copy link
Author

cxa commented Jun 13, 2025

Sorry, I thought you would have other design decisions and this PR might block.

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