Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FB16677264: SwiftUI .textSelection(.enabled) should work across multiple Text views #617

Open
sindresorhus opened this issue Mar 1, 2025 · 0 comments

Comments

@sindresorhus
Copy link
Member

  • Date: 2025-03-01
  • Resolution: Open
  • Area: SwiftUI
  • OS: macOS 15.2
  • Type: Incorrect/Unexpected Behavior

Description

For example, this only lets me select Hello and World individually, but not in one selection.

VStack {
	Text("Hello")
		.textSelection(.enabled)
	Text(" ")
	Text("World")
		.textSelection(.enabled)
}

This makes it really hard to have complex views where only some parts can be selected.

I’m aware I could use + on the Text views to combine them, but the above is just a very minimal example. It would not work in my real-world code.

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

No branches or pull requests

1 participant