-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Do not reset text selection when the TextBox loses focus #17195
Do not reset text selection when the TextBox loses focus #17195
Conversation
Do not render selection highlight when the TextBox doesn't has focus
You can test this PR using the following package version. |
You can test this PR using the following package version. |
…d/Avalonia into fixes/resetSelectionOnLoseFocus
You can test this PR using the following package version. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Do we want to introduce an option to keep the old behavior?
We could add such option and change the default in a future release y |
Make inactive selection highlight optional
You can test this PR using the following package version. |
…d/Avalonia into fixes/resetSelectionOnLoseFocus
You can test this PR using the following package version. |
* Do not reset the selected range when the TextBox loses focus Do not render selection highlight when the TextBox doesn't has focus * Invalidate TextLayout when the focus is lost * Make ClearSelectionAfterFocusLost optional Make inactive selection highlight optional * Make sure changes to ShowSelectionHighlight invalidate the visual and text layout
What does the pull request do?
This PR removes some code that explicitly resets the current selection when the TextBox loses focus. We also no longer render the text selection when the TextBox has no focus to match what other frameworks do.
What is the current behavior?
What is the updated/expected behavior with this PR?
How was the solution implemented (if it's not obvious)?
Checklist
Breaking changes
Obsoletions / Deprecations
Fixed issues
Fixes: #17151