Skip to content

AutoCompleteBox don't lose text selection when contextmenu opens #17462

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

Conversation

punker76
Copy link
Contributor

@punker76 punker76 commented Nov 9, 2024

What does the pull request do?

When implementing copy and paste context menu items for AutoCompleteBox it's not possible because text selection gets lost.

This issue was solved also for TextBox in #4498

What is the current behavior?

Selection is gone.

What is the updated/expected behavior with this PR?

Selection should be the same.

How was the solution implemented (if it's not obvious)?

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

Fixes #17453

@punker76 punker76 force-pushed the fixes/17453-autocompletebox-dont-lose-text-selection-when-contextmenu-opens branch from 3c77bb9 to b236062 Compare November 9, 2024 22:07
@avaloniaui-bot
Copy link

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

@cla-avalonia
Copy link
Collaborator

cla-avalonia commented Nov 9, 2024

  • All contributors have signed the CLA.

@punker76
Copy link
Contributor Author

punker76 commented Nov 9, 2024

@cla-avalonia agree

Copy link
Member

@MrJul MrJul left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution! The matching unit test is really appreciated. A small change is needed though.

@punker76 punker76 force-pushed the fixes/17453-autocompletebox-dont-lose-text-selection-when-contextmenu-opens branch from b236062 to 0e53305 Compare November 10, 2024 11:27
Copy link
Member

@MrJul MrJul left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@avaloniaui-bot
Copy link

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

@MrJul MrJul added this pull request to the merge queue Nov 10, 2024
Merged via the queue into AvaloniaUI:master with commit 0fdd84f Nov 10, 2024
10 checks passed
@punker76 punker76 deleted the fixes/17453-autocompletebox-dont-lose-text-selection-when-contextmenu-opens branch November 10, 2024 16:46
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.

AutoCompleteBox loses selection when context menu opened
5 participants