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

TextBox should not clear selection on focus loss #17151

Closed
billhenn opened this issue Sep 27, 2024 · 0 comments · Fixed by #17195
Closed

TextBox should not clear selection on focus loss #17151

billhenn opened this issue Sep 27, 2024 · 0 comments · Fixed by #17195

Comments

@billhenn
Copy link
Contributor

Is your feature request related to a problem? Please describe.

Right now, when a TextBox loses focus, it clears the selection. This prevents external controls, like toolbar buttons, from obtaining the TextBox selection and interacting with it since it is now gone. Further, when re-Tabbing back into the control, the selection is not restored.

Describe the solution you'd like

Instead of clearing the selection, the TextBox should simply not render the selected text differently (as "selected") when focus is outside of the control. This allows external controls to access the selection, and keeps things visually the same as before. And then when focus moves back into the control, the selection is restored and redisplayed unless otherwise programmatically altered.

One thing to be careful of is when the TextBox's context menu/flyout is open, you still want to render the selected text as "selected".

Describe alternatives you've considered

No response

Additional context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants