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

Only add the text selection canvas when the textbox is focused #16643

Merged
merged 1 commit into from
Aug 15, 2024

Conversation

emmauss
Copy link
Contributor

@emmauss emmauss commented Aug 9, 2024

What does the pull request do?

TextSelectionCanvas will now only be created and added to the visual tree when its TextBox is focused, and be removed when unfocused.

What is the current behavior?

TextSelectionCanvas is currently created when a textbox is shows, even when not active. This occurs for every textbox in the visual tree. Even if not visible, it add some layout overhead.

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

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 11.2.999-cibuild0051127-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul
Copy link
Member

MrJul commented Aug 11, 2024

LGTM!

@maxkatz6 maxkatz6 added this pull request to the merge queue Aug 15, 2024
Merged via the queue into master with commit 335894c Aug 15, 2024
12 checks passed
@maxkatz6 maxkatz6 deleted the text_selector_focus_toggle branch August 15, 2024 08:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants